 * {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

:root {
  --primary-color: #4ecdc4;
  --primary-dark: #3dbdb5;
  --primary-light: #6ed7d0;
  --primary-rgb: 78, 205, 196;
  --primary-dark-rgb: 61, 189, 181;
  --primary-light-rgb: 110, 215, 208;
  --secondary-color: #ff6b6b;
  --text-primary: #333;
  --text-secondary: #666;
  --text-light: #999;
  --bg-light: #f8f9fa;
  --bg-primary: #ffffff;
  --border-color: #e5e7eb;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
  --shadow-glow: 0 4px 20px rgba(78, 205, 196, 0.4);
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  
  /* 系统主题色 */
  --system-bg: Canvas;
  --system-text: CanvasText;
  --system-accent: AccentColor;
  --system-border: BorderColor;
  --system-link: LinkText;
  --system-visited: VisitedText;
}

/* 深色模式 */
@media (prefers-color-scheme: dark) {
  :root {
    --text-primary: #e0e0e0;
    --text-secondary: #b0b0b0;
    --text-light: #808080;
    --bg-light: #1a1a1a;
    --bg-primary: #1a1a2e;
    --border-color: rgba(255, 255, 255, 0.1);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 4px 20px rgba(78, 205, 196, 0.3);
  }
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: linear-gradient(180deg, #c3cfe2 0%, #f5f7fa 100%);
  min-height: 100vh;
  padding-bottom: 65px;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

@media (prefers-color-scheme: dark) {
  body {
    background-color: #121212;
  }
}

body::-webkit-scrollbar {
  display: none;
}

body.scan-fixed {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  padding-bottom: 0;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

*::-webkit-scrollbar {
  display: none;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

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

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }
  50% {
    transform: scale(1.05);
  }
  70% {
    transform: scale(0.9);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* 主横幅区域 */
.banner {
  background: #4ecdc4;
  padding: 120px 20px;
  position: relative;
  border-radius: 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

#pageMy .banner {
  /* margin-top 已经把整卡向下推过状态栏，卡片内部只需常规 padding，
     避免与 --app-safe-area-top 重复叠加导致顶部空白过高 */
  padding: clamp(16px, 4.5vw, 24px) clamp(12px, 4vw, 16px);
  margin-top: calc(12px + var(--app-safe-area-top, 0px)) !important;
  margin-right: 16px !important;
  margin-bottom: 0 !important;
  margin-left: 16px !important;
  border-radius: 16px;
  box-shadow: 0 6px 18px rgba(78, 205, 196, 0.25);
  overflow: hidden;
  position: relative;
  background: linear-gradient(135deg, #4ecdc4 0%, #44b3ab 100%);
  width: auto !important;
  max-width: none !important;
  box-sizing: border-box;
}

.banner-content {
  text-align: center;
  margin-bottom: 16px;
  position: relative;
  z-index: 2;
  animation: fadeInUp 0.8s ease-out;
}

.banner-title {
  font-size: clamp(26px, 8vw, 32px);
  font-weight: 800;
  color: #fff;
  margin-bottom: 14px;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  letter-spacing: 2px;
  white-space: nowrap;
}

.banner-subtitle {
  font-size: 17px;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
  letter-spacing: 3px;
}

.banner-wave {
  position: absolute;
  bottom: -79px;
  left: 0;
  width: 100%;
  height: 80px;
  transform: scaleY(-1);
}

.wave-container {
  width: 100%;
  margin-top: -2px;
  position: relative;
  z-index: 10;
  overflow: visible;
}

.wave-icon {
  width: 100%;
  height: 80px;
  display: block;
}

.city-silhouette {
  width: 100%;
  margin-bottom: 24px;
  position: relative;
  z-index: 2;
  animation: fadeInUp 1s ease-out 0.2s both;
}

.city-svg {
  width: 100%;
  height: auto;
}

.banner-feedback {
  text-align: center;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.1);
  padding: 12px 16px;
  border-radius: 16px;
  position: relative;
  z-index: 2;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  animation: fadeInUp 1s ease-out 0.4s both;
}

/* 功能按钮区 */
.action-section {
  display: flex;
  gap: 20px;
  padding: 0 28px;
  margin-top: 150px;
  position: relative;
  z-index: 10;
}

.action-btn {
  flex: 1;
  height: 56px;
  border-radius: 28px;
  border: none;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.action-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s ease;
}

.action-btn:hover::before {
  left: 100%;
}

.primary-btn {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: #fff;
  box-shadow: var(--shadow-glow);
  animation: fadeInUp 0.8s ease-out 0.3s both;
}

.primary-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(78, 205, 196, 0.5);
}

.primary-btn:active {
  transform: translateY(-1px) scale(0.98);
}

.secondary-btn {
  background: #fff;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  box-shadow: var(--shadow-md);
  animation: fadeInUp 0.8s ease-out 0.4s both;
}

.secondary-btn:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  background: linear-gradient(135deg, rgba(78, 205, 196, 0.05) 0%, rgba(68, 160, 141, 0.05) 100%);
}

.secondary-btn:active {
  transform: translateY(-1px) scale(0.98);
}

/* 底部导航 */
.bottom-nav {
  --nav-item-size: clamp(58px, calc((100vw - 24px) / 5), 70px);
  --nav-list-width: calc(var(--nav-item-size) * 5);
  position: fixed;
  bottom: 0;
  left: 50%;
  right: auto;
  width: 100%;
  max-width: 440px;
  height: var(--nav-item-size);
  padding: 0;
  border: 0;
  border-radius: 14px 14px 0 0;
  background: linear-gradient(90deg, #42A5F5, #c891d5);
  box-shadow: 0 12px 34px rgba(var(--primary-rgb), 0.32);
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: visible;
  z-index: 100;
  transform: translateX(-50%);
  transition: opacity var(--transition-fast);
}

.bottom-nav .nav-item {
  position: relative;
  flex: 0 0 var(--nav-item-size);
  width: var(--nav-item-size);
  height: var(--nav-item-size);
  min-width: 0;
  padding: 0;
  border-radius: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  color: #fff;
  cursor: pointer;
  z-index: 1;
  -webkit-tap-highlight-color: transparent;
}

.bottom-nav .nav-item:not(.scan-item) .nav-icon {
  transform: translateY(-6px);
}

.bottom-nav .nav-item:active,
.bottom-nav .nav-item:focus {
  outline: none;
  background: transparent !important;
  box-shadow: none !important;
}

.bottom-nav .nav-item:hover,
.bottom-nav .nav-item.active {
  color: #fff;
}

.bottom-nav .nav-icon,
.bottom-nav .scan-icon {
  position: relative;
  display: block;
  width: 1.5em;
  height: 1.5em;
  color: currentColor;
  transition: 0.5s;
}

.bottom-nav .nav-icon path,
.bottom-nav .scan-icon path {
  fill: currentColor !important;
}

.bottom-nav .nav-item.scan-item {
  justify-content: center;
  padding-bottom: 0;
}

.bottom-nav .nav-item.scan-item::before {
  content: '';
  display: block;
  width: 1.5em;
  height: 1.5em;
  transform: translateY(-6px);
  pointer-events: none;
}

.bottom-nav .nav-item.scan-item .scan-icon-bg {
  position: absolute;
  top: 0;
  left: 50%;
  margin: 0;
  transform: translate(-50%, -50%);
}

.bottom-nav .nav-item.scan-item:hover .scan-icon-bg,
.bottom-nav .nav-item.scan-item.active:hover .scan-icon-bg,
.bottom-nav .nav-item.scan-item:active .scan-icon-bg {
  transform: translate(-50%, -50%);
}

.bottom-nav .nav-text {
  position: static;
  color: #fff;
  font-size: 0.72em;
  font-weight: 400;
  letter-spacing: 0.05em;
  opacity: 1;
  transition: 0.3s;
  white-space: nowrap;
  line-height: 1;
}

.bottom-nav .nav-item.scan-item .nav-text {
  position: static;
}

.bottom-nav .nav-item:not(.scan-item).active .nav-text {
  font-weight: 600;
}

.bottom-nav .nav-item:not(.scan-item).active .nav-icon {
  transform: translateY(-8px) scale(1.08);
}

.bottom-nav .nav-item::after {
  display: none;
}

.bottom-nav .nav-item.scan-item::after {
  content: '';
  position: absolute;
  display: block;
  top: 0;
  left: 50%;
  width: calc(var(--nav-item-size) * 0.72);
  height: calc(var(--nav-item-size) * 0.72);
  border: 1.8px solid #fff;
  border-radius: 50%;
  box-sizing: border-box;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 2;
}

.bottom-nav .scan-icon-bg {
  position: relative;
  top: auto;
  width: auto;
  height: auto;
  margin: 0;
  border-radius: 0;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: none;
}

.bottom-nav .nav-item.scan-item .scan-icon {
  width: 42px;
  height: 42px;
  transition: none;
}

.bottom-nav .nav-item.scan-item:hover .scan-icon-bg,
.bottom-nav .nav-item.scan-item.active:hover .scan-icon-bg,
.bottom-nav .nav-item.scan-item:active .scan-icon-bg {
  transform: translate(-50%, -50%);
}

.nav-indicator {
  position: absolute;
  top: -50%;
  left: calc((100% - var(--nav-list-width)) / 2);
  width: var(--nav-item-size);
  height: var(--nav-item-size);
  box-sizing: border-box;
  border-radius: 50%;
  border: 6px solid #b7d8ea;
  background: linear-gradient(90deg, #42A5F5, #4ECDC4);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 1;
  transform: translateX(calc(var(--nav-item-size) * 4));
  transition: none;
  pointer-events: none;
}

.nav-indicator::before,
.nav-indicator::after {
  display: none;
}

.bottom-nav .nav-item.scan-item.active ~ .nav-indicator,
.bottom-nav .nav-item.active:not(.scan-item) ~ .nav-indicator,
.bottom-nav .nav-item:nth-child(1).active ~ .nav-indicator,
.bottom-nav .nav-item:nth-child(2).active ~ .nav-indicator,
.bottom-nav .nav-item:nth-child(3).active ~ .nav-indicator,
.bottom-nav .nav-item:nth-child(4).active ~ .nav-indicator,
.bottom-nav .nav-item:nth-child(5).active ~ .nav-indicator {
  opacity: 1;
  transform: translateX(calc(var(--nav-item-size) * 4));
}

/* 加载动画 */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--primary-color);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 22px;
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-overlay.hidden {
  opacity: 0;
  visibility: hidden;
}

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

.loading-18 {
  width: 48px;
  height: 48px;
  display: inline-block;
  position: relative;
  border: 2px solid #ddd;
  animation: loading-18-0 2s linear infinite;
}

.loading-18:after,
.loading-18:before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  margin: auto;
  border: 2px solid #ff3d00;
  width: 38px;
  height: 38px;
  animation: loading-18-1 1.5s linear infinite;
  transform-origin: center center;
}

.loading-18:before {
  width: 28px;
  height: 28px;
  border-color: #ddd;
  animation: loading-18-0 1s linear infinite;
}

.loading-text {
  color: #fff;
  font-size: 16px;
  font-weight: 400;
}

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

@keyframes loading-18-0 {
  0% {
    transform: rotate(0);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes loading-18-1 {
  0% {
    transform: rotate(0);
  }

  to {
    transform: rotate(-360deg);
  }
}

/* 响应式优化 */
@media (max-width: 375px) {
  .banner-title {
    font-size: 26px;
  }

  .banner-subtitle {
    font-size: 15px;
  }

  .action-btn {
    height: 50px;
    font-size: 15px;
  }
}

.page-content {
  padding: 20px 16px 50px;
  min-height: calc(100vh - 250px);
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

#pageMy {
  padding: 0;
}

#pageAssetAdd {
  background: transparent;
  min-height: auto;
}

.page-content::-webkit-scrollbar {
  display: none;
}

.repair-header {
  text-align: center;
  padding: 0;
}

.scan-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 0;
}

.create-repair-form {
  padding: 20px 0;
}

.status-title {
  background: #fff;
  border-radius: 12px;
  padding: 10px 0;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
  font-size: 18px;
  font-weight: 600;
  color: var(--primary-color);
  text-align: center;
}

/* 头像上传样式 */
.avatar-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 0;
  margin-bottom: 20px;
  border-bottom: 1px solid #f0f0f0;
}

.avatar-wrapper {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  cursor: pointer;
  border: 3px solid #4ecdc4;
  transition: all 0.3s ease;
}

.avatar-wrapper:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(78, 205, 196, 0.3);
}

.avatar-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.avatar-wrapper:hover .avatar-overlay {
  opacity: 1;
}

.avatar-change-btn {
  margin-top: 12px;
  padding: 8px 20px;
  background: linear-gradient(135deg, #4ecdc4 0%, #3dbdb5 100%);
  color: white;
  border: none;
  border-radius: 20px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.avatar-change-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(78, 205, 196, 0.4);
}

.feedback-modal .modal-header .modal-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.feedback-modal .modal-close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: #f5f5f5;
  border-radius: 50%;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.feedback-modal .modal-close:hover {
  background: #eee;
  transform: rotate(90deg);
}

.feedback-modal-body {
  padding: 16px 20px;
  overflow-y: auto;
  background: #fff;
  flex: 1;
}

/* 通用modal-body样式 */
.modal-body {
  padding: 20px;
  overflow-y: auto;
  max-height: calc(80vh - 120px);
}

/* 默认body区域的最大高度（无footer时）*/
.feedback-modal .feedback-modal-body {
  max-height: calc(80vh - 140px);
}

/* 当有footer或buttons时，body区域的最大高度 */
.feedback-modal.has-footer .feedback-modal-body,
.feedback-modal:has(.modal-buttons) .feedback-modal-body {
  max-height: calc(80vh - 200px);
}

.feedback-modal .feedback-form {
  padding: 0;
}

.feedback-modal .modal-footer {
  padding: 16px 20px;
  display: flex;
  gap: 12px;
  border-top: 1px solid #f0f0f0;
  background: linear-gradient(180deg, #fafbfc 0%, #ffffff 100%);
  flex-shrink: 0;
}

.feedback-modal .modal-btn {
  flex: 1;
  height: 44px;
  padding: 0 24px;
  font-size: 15px;
  font-weight: 500;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.feedback-modal .modal-btn.primary {
  background: var(--primary-color);
  color: #fff;
}

.feedback-modal .modal-btn.primary:hover {
  background: #3dbdb5;
}

.feedback-modal .modal-btn.secondary {
  background: #f5f5f5;
  color: #666;
}

.feedback-modal .modal-btn.secondary:hover {
  background: #eee;
}

.banner .my-profile {
  display: flex;
  align-items: center;
  padding: 20px;
  gap: 16px;
}

/* 我的页面头部样式 */
.my-back-btn {
  position: absolute;
  top: 20px;
  left: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 3;
}

/* 详情页面样式 */
.detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  background: #fff;
  border-radius: 14px;
  margin-bottom: 16px;
  box-shadow: none;
}

/* Toast 弹窗样式 */
.toast-container {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 20000;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.toast {
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  opacity: 0;
  transform: translateY(-20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: auto;
  max-width: 300px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(4px);
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast.hide {
  opacity: 0;
  transform: translateY(-20px);
}

/* Modal 弹窗样式 */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  min-height: 100vh;
  min-height: -webkit-fill-available;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  padding: 20px;
  -webkit-overflow-scrolling: touch;
  overflow-y: auto;
}

/* 登录弹窗遮罩层特殊处理 */
.modal-overlay:has(.login-modal) {
  padding: 0;
}

.modal-overlay.login-required-overlay {
  z-index: 10002;
}

.modal-overlay.show {
  opacity: 1;
  visibility: visible;
}

/* 确保弹窗内容不会溢出 */
.modal-overlay.show .modal,
.modal-overlay.show .feedback-modal,
.modal-overlay.show .evaluate-modal,
.modal-overlay.show .select-modal {
  max-height: 90vh;
  overflow-y: auto;
}

/* 登录弹窗特殊处理 - 不需要最大高度限制 */
.modal-overlay.show .login-modal {
  max-height: none;
  overflow: hidden;
}

.modal {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  max-width: 320px;
  width: 90%;
  text-align: center;
  transform: scale(0.9);
  transition: transform 0.3s ease;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  margin: auto;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

.modal-overlay.show .modal {
  transform: scale(1);
}

/* 确保所有特殊弹窗类型都居中 */
.modal-overlay.show .feedback-modal,
.modal-overlay.show .evaluate-modal,
.modal-overlay.show .select-modal {
  margin: auto;
  position: relative;
  align-self: center;
}

/* 登录弹窗全屏显示 */
.modal-overlay.show .login-modal {
  margin: 0;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  max-height: 100vh;
  align-self: stretch;
  border-radius: 0;
  z-index: 10001;
}

/* 使用伪元素向下延伸确保完全覆盖 */
.modal-overlay.show .login-modal::before {
  content: '';
  position: absolute;
  bottom: -100px;
  left: 0;
  right: 0;
  height: 100px;
  background: inherit;
  z-index: -1;
}

/* 登录弹窗显示时隐藏底部导航栏 */
body:has(.modal-overlay.show .login-modal) .bottom-nav {
  display: none !important;
}

.modal-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-icon.success {
  background: #52c41a;
}

.modal-icon.error {
  background: #ff4d4f;
}

.modal-icon.warning {
  background: #faad14;
}

.modal-icon.info {
  background: #1890ff;
}

.modal-icon svg {
  width: 28px;
  height: 28px;
  fill: #fff;
}

.modal-title {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
}

.modal-content {
  font-size: 14px;
  color: #666;
  margin-bottom: 24px;
  line-height: 1.6;
}

.modal-buttons {
  padding: 16px 20px;
  display: flex;
  gap: 12px;
  border-top: 1px solid #f0f0f0;
  background: linear-gradient(180deg, #fafbfc 0%, #ffffff 100%);
  flex-shrink: 0;
}

/* 登录弹窗按钮容器样式 */
.login-modal .modal-buttons {
  padding: 16px 32px 24px;
  background: linear-gradient(180deg, #fafbfc 0%, #ffffff 100%);
  border-top: 1px solid #e8ecef;
  gap: 16px;
  flex-shrink: 0;
  display: flex;
  justify-content: center;
}

.modal-btn {
  padding: 10px 24px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
}

.modal-btn.primary {
  background: #4ecdc4;
  color: #fff;
}

.modal-btn.primary:hover {
  background: #45b7af;
}

.modal-btn.secondary {
  background: #f5f5f5;
  color: #666;
}

.modal-btn.secondary:hover {
  background: #e8e8e8;
}

/* 单按钮样式 */
.modal-buttons.single .modal-btn {
  width: 100%;
}

/* 工具菜单排序 */
#toolStatistics { order: 1; }
#toolSchedule { order: 2; }
#toolAssets { order: 3; }
#toolSettings { order: 4; }
#toolHelp { order: 5; }
#toolNotifications { order: 6; }
#toolContact { order: 7; }
#toolUserAgreement { order: 8; }
#toolPrivacyPolicy { order: 9; }
#toolOpenApi { order: 10; }
#toolClearCache { order: 11; }

.cache-confirm-modal {
  width: min(88vw, 340px);
  max-width: 340px;
  padding: 0;
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(180deg, #ffffff 0%, #fbfefe 100%);
  box-shadow: 0 18px 50px rgba(20, 65, 70, 0.22);
}

.cache-confirm-modal .modal-icon.warning {
  width: 58px;
  height: 58px;
  margin: 26px auto 14px;
  background: linear-gradient(135deg, #4ecdc4 0%, #2db4aa 100%);
  box-shadow: 0 10px 24px rgba(78, 205, 196, 0.35);
}

.cache-confirm-modal .modal-title {
  margin: 0 24px 10px;
  color: #173f3d;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.2px;
}

.cache-confirm-modal .modal-content {
  margin: 0;
  padding: 0 26px 22px;
  color: #607472;
  font-size: 13px;
  line-height: 1.7;
}

.cache-confirm-modal .modal-content strong,
.cache-confirm-modal .modal-content span {
  display: block;
}

.cache-confirm-modal .modal-content strong {
  margin-bottom: 6px;
  color: #294845;
  font-size: 14px;
  font-weight: 700;
}

.cache-confirm-modal .modal-buttons {
  display: flex;
  flex-direction: row;
  gap: 10px;
  padding: 14px 18px 18px;
  border-top: 1px solid rgba(78, 205, 196, 0.12);
  background: #f7fbfb;
}

.cache-confirm-modal .modal-btn {
  flex: 1;
  height: 44px;
  padding: 0 12px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
}

.cache-confirm-modal .modal-btn.secondary {
  background: #eef4f4;
  color: #607472;
}

.cache-confirm-modal .modal-btn.primary {
  background: linear-gradient(135deg, #4ecdc4 0%, #35bdb5 100%);
  color: #fff;
  box-shadow: 0 8px 18px rgba(78, 205, 196, 0.32);
}

.cache-confirm-modal .modal-btn:active {
  transform: translateY(1px) scale(0.98);
}

@media (prefers-color-scheme: dark) {
  .cache-confirm-modal {
    background: linear-gradient(180deg, #1f2633 0%, #1a202b 100%);
  }

  .cache-confirm-modal .modal-title {
    color: #fff;
  }

  .cache-confirm-modal .modal-content {
    color: #b9c8c7;
  }

  .cache-confirm-modal .modal-content strong {
    color: #e9fbfa;
  }

  .cache-confirm-modal .modal-buttons {
    background: #182229;
    border-top-color: rgba(78, 205, 196, 0.16);
  }

  .cache-confirm-modal .modal-btn.secondary {
    background: #26333a;
    color: #d7e3e2;
  }
}

/* 选择弹窗样式 */
.modal.select-modal {
  max-width: 340px;
  width: 90%;
  padding: 0;
  overflow: hidden;
  transform: scale(1);
  margin: auto;
  align-self: center;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #f0f0f0;
}

.modal-header .modal-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

/* 登录弹窗头部样式 */
.login-modal .modal-header {
  padding: 20px 32px;
  border-bottom: 1px solid #e8ecef;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.login-modal .modal-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-align: center;
}

.modal-close {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  font-size: 24px;
  color: var(--text-light);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all var(--transition-fast);
}

.modal-close:hover,
.modal-close:active {
  background: #f5f5f5;
  color: var(--text-primary);
}

.login-modal .modal-close {
  width: 36px;
  height: 36px;
  font-size: 28px;
  color: #94a3b8;
  background: #f1f5f9;
}

.login-modal .modal-close:hover {
  background: #e2e8f0;
  color: var(--text-primary);
  transform: rotate(90deg);
}

.select-list {
  max-height: 60vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
}

.select-item {
  padding: 14px 20px;
  font-size: 15px;
  color: var(--text-primary);
  cursor: pointer;
  transition: background var(--transition-fast);
  border-bottom: 1px solid #f8f9fa;
}

.select-item.custom-select-item {
  color: var(--primary-color);
  font-weight: 700;
  background: rgba(78, 205, 196, 0.08);
}

.select-item.custom-select-item::before {
  content: '+';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--primary-color);
  color: #fff;
  font-size: 14px;
  line-height: 1;
}

.select-item.custom-select-item:hover,
.select-item.custom-select-item:active {
  background: rgba(78, 205, 196, 0.16);
}

.custom-department-modal .modal-header {
  background: linear-gradient(135deg, rgba(78, 205, 196, 0.16) 0%, rgba(78, 205, 196, 0.04) 100%);
  border-bottom-color: rgba(78, 205, 196, 0.22);
}

.custom-department-modal .modal-title,
.custom-department-modal .form-label {
  color: var(--primary-color);
}

.custom-department-modal .form-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(78, 205, 196, 0.14);
}

.custom-department-modal .modal-btn.primary {
  background: var(--primary-color);
  color: #fff;
}

/* 企业信息弹窗样式（与评价弹窗/系统公告一致）*/
.company-modal {
  max-width: 420px;
  width: 90%;
  padding: 0;
  text-align: left;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.company-modal .modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid #f0f0f0;
  background: linear-gradient(135deg, #ffffff 0%, #fafbfc 100%);
}

.company-modal .modal-header .modal-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.company-modal .modal-body {
  padding: 24px;
}

.company-modal .form-item {
  margin-bottom: 0;
}

.company-modal .form-label {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
  display: block;
}

.company-modal .form-value-wrap {
  width: 100%;
  height: 52px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid #e8ecef;
  background: #fff;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all var(--transition-fast);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.company-modal .form-value-wrap:hover {
  border-color: var(--primary-color);
  box-shadow: 0 4px 12px rgba(78, 205, 196, 0.15);
}

.company-modal .form-value {
  font-size: 15px;
  color: var(--text-primary);
}

.company-modal .modal-footer {
  padding: 16px 24px 20px;
  display: flex;
  gap: 16px;
  border-top: 1px solid #f0f0f0;
  background: linear-gradient(180deg, #fafbfc 0%, #ffffff 100%);
}

.company-modal .modal-btn {
  flex: 1;
  height: 44px;
  padding: 0 24px;
  font-size: 15px;
  font-weight: 500;
  border-radius: 10px;
}

.select-item:last-child {
  border-bottom: none;
}

.select-item:hover {
  background: rgba(78, 205, 196, 0.05);
}

.select-item:active {
  background: rgba(78, 205, 196, 0.1);
}

.select-item.selected {
  background: rgba(78, 205, 196, 0.1);
  color: var(--primary-color);
  font-weight: 600;
}

.select-group-header {
  padding: 10px 20px;
  font-size: 12px;
  color: var(--text-light);
  background: #f8f9fa;
  font-weight: 500;
  border-bottom: 1px solid #eee;
}

/* ==================== 登录弹窗样式（优化版）==================== */

.login-modal {
  width: 100%;
  max-width: 450px;
  min-width: 320px;
  max-height: 90vh;
  padding: 0;
  overflow: hidden;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  transform: scale(1);
  margin: auto;
  display: flex;
  flex-direction: column;
  background: var(--bg-primary);
  color: var(--text-primary);
  color-scheme: light;
}

/* 顶部背景区域 - 使用登录背景图片 */
.login-header-bg {
  background: url('../../images/login/dl1.jpg?v=20260702') no-repeat center center / cover;
  padding: 48px 40px 40px;
  text-align: center;
  color: #ffffff;
  position: relative;
  overflow: hidden;
  border-radius: 16px 16px 0 0;
}

.login-header-bg::before {
  content: none;
}

.login-site-title {
  font-size: 32px;
  font-weight: 700;
  margin: 0 0 12px 0;
  line-height: 1.3;
  position: relative;
  z-index: 1;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.login-welcome-text {
  font-size: 16px;
  opacity: 0.95;
  margin: 0;
  line-height: 1.4;
  position: relative;
  z-index: 1;
  color: #fff;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.35);
}

.login-header-bg {
  cursor: pointer;
}

.back-indicator {
  display: block;
  font-size: 12px;
  opacity: 0.8;
  margin-top: 8px;
  position: relative;
  z-index: 1;
  color: rgba(255, 255, 255, 0.8);
}

/* 主内容区 */
.login-main-content {
  flex: 1;
  overflow-y: auto;
  padding: 32px 40px 40px;
  display: flex;
  flex-direction: column;
  background: var(--bg-primary);
}

/* 欢迎标题 */
.login-welcome {
  margin-bottom: 48px;
  margin-top: 20px;
}

.login-greeting {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 8px 0;
  line-height: 1.3;
}

.login-subtitle {
  font-size: 18px;
  font-weight: 500;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.4;
}

/* 表单包装器 */
.login-form-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* 带图标的表单组 - 标签在输入框上方左边 */
.form-group.with-icon {
  margin-bottom: 20px;
}

.form-group.with-icon:last-child {
  margin-bottom: 0;
}

.form-group.with-icon .form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  text-align: left;
  line-height: 1.4;
}

.form-group.with-icon .form-label i {
  color: var(--primary-color);
  margin-right: 8px;
  font-size: 14px;
}

/* 头像上传 */
.avatar-upload-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 20px;
  padding: 16px;
  border: 2px dashed var(--border-color);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.02);
}
.register-header-bg {
  padding: 28px 40px 24px;
}
.register-header-bg .login-site-title {
  font-size: 24px;
  margin-bottom: 8px;
}
.register-header-bg .login-welcome-text {
  font-size: 14px;
}
.avatar-upload-box input[type="file"] {
  position: absolute;
  width: 80px;
  height: 80px;
  opacity: 0;
  cursor: pointer;
}
.avatar-preview {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: #e9ecef;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.avatar-preview img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.avatar-preview i { font-size: 28px; color: #adb5bd; }
.avatar-upload-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.avatar-upload-btn {
  padding: 8px 16px;
  background: var(--primary-color);
  color: #fff;
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  user-select: none;
  display: inline-block;
  width: fit-content;
}
.avatar-size-tip {
  font-size: 12px;
  color: var(--text-light);
}

@media (prefers-color-scheme: dark) {
  .form-group.with-icon {
    border-bottom-color: rgba(255, 255, 255, 0.1);
  }
  
  .form-group.with-icon .form-label {
    color: #e5e7eb;
  }
}

/* 输入框样式 */
.login-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 15px;
  color: var(--text-primary);
  background: var(--bg-primary);
  transition: all 0.3s ease;
  outline: none;
  box-sizing: border-box;
}

.gender-select-group {
  display: flex;
  gap: 10px;
}

.gender-select-group .gender-option {
  flex: 1;
  position: relative;
  cursor: pointer;
}

.gender-select-group .gender-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.gender-select-group .gender-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 0;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 14px;
  color: var(--text-primary);
  background: var(--bg-primary);
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.gender-select-group .gender-option input[type="radio"]:checked + .gender-label {
  border-color: var(--primary-color);
  color: var(--primary-color);
  background: rgba(78, 205, 196, 0.08);
  box-shadow: 0 0 0 3px rgba(78, 205, 196, 0.15);
}

@media (prefers-color-scheme: dark) {
  .gender-select-group .gender-label {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
  }
}

@media (prefers-color-scheme: dark) {
  .login-input {
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
  }
  
  .login-input:focus {
    border-color: #727CFB;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(114, 124, 251, 0.1);
  }
  
  .login-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
  }
}

.login-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(78, 205, 196, 0.15);
}

.login-input::placeholder {
  color: var(--text-light);
}

/* 验证码组 - 仿照图片设计 */
.captcha-group {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid #e5e7eb;
}

@media (prefers-color-scheme: dark) {
  .captcha-group {
    border-bottom-color: rgba(255, 255, 255, 0.1);
  }
}

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

.captcha-icon {
  position: absolute;
  left: 14px;
  color: var(--primary-color);
  font-size: 16px;
  z-index: 1;
}

.captcha-input {
  width: 100%;
  padding: 12px 16px 12px 42px !important;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 15px;
  background: var(--bg-primary);
  color: var(--text-primary);
  transition: all 0.3s ease;
}

.captcha-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(78, 205, 196, 0.15);
  outline: none;
}

.captcha-question {
  min-width: 100px;
  padding: 12px 20px;
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  border-radius: 8px;
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  color: #dc2626;
  user-select: none;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.1);
  cursor: pointer;
  transition: all 0.3s ease;
}

.captcha-question:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.2);
}

.captcha-question:active {
  transform: scale(0.98);
}

@media (prefers-color-scheme: dark) {
  .captcha-question {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.2) 0%, rgba(220, 38, 38, 0.1) 100%);
    color: #f87171;
  }
  
  .captcha-question:hover {
    box-shadow: 0 4px 12px rgba(248, 113, 113, 0.3);
  }
}

/* 验证码组 */
.verification-code-group {
  display: flex;
  gap: 12px;
}

.verification-input {
  flex: 1;
}

.verification-code-group .flex-1 {
  flex: 1;
}

.get-code-btn {
  padding: 0 20px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(78, 205, 196, 0.3);
}

.get-code-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(78, 205, 196, 0.4);
}

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

.get-code-btn:disabled {
  background: #e5e7eb;
  cursor: not-allowed;
  box-shadow: none;
}

@media (prefers-color-scheme: dark) {
  .get-code-btn:disabled {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.4);
  }
}

/* 登录按钮 - 系统主题色 */
.login-submit-btn {
  width: 100%;
  padding: 14px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 50px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 24px;
  box-shadow: 0 4px 12px rgba(78, 205, 196, 0.3);
}

.login-submit-btn:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(78, 205, 196, 0.4);
}

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

.login-submit-btn i {
  margin-right: 8px;
}

.login-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: -4px 0 18px;
  font-size: 14px;
  color: #6b7280;
}

.login-option {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
}

.login-option input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border: 1.5px solid #4ecdc4;
  border-radius: 50%;
  background: #fff;
  position: relative;
  flex: 0 0 16px;
}

.login-option input[type="checkbox"]:checked {
  border-color: #4ecdc4;
}

.login-option input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ecdc4;
  transform: translate(-50%, -50%);
}

@media (prefers-color-scheme: dark) {
  .login-options {
    color: var(--text-light);
  }
}

/* 切换模式 */
.login-switch-mode {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  font-size: 14px;
}

@media (prefers-color-scheme: dark) {
  .login-switch-mode {
    color: var(--text-secondary);
  }
}

.switch-link-text {
  color: #727CFB;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
}

.switch-link-text:hover {
  opacity: 0.8;
  text-decoration: underline;
}

.forgot-password-link {
  color: #6b7280;
}

@media (prefers-color-scheme: dark) {
  .forgot-password-link {
    color: var(--text-light);
  }
}

/* 第三方登录 */
.third-party-login {
  margin-top: 32px;
}

.divider {
  display: flex;
  align-items: center;
  margin-bottom: 24px;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e5e7eb;
}

@media (prefers-color-scheme: dark) {
  .divider::before,
  .divider::after {
    background: rgba(255, 255, 255, 0.2);
  }
  
  .divider span {
    color: var(--text-light);
  }
}

.divider span {
  padding: 0 16px;
  color: #9ca3af;
  font-size: 14px;
}

.social-login-icons {
  display: flex;
  justify-content: center;
  gap: 20px;
}

.social-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 24px;
  color: white;
}

.social-icon i {
  font-size: 24px;
}

.social-icon.wechat {
  background: #07C160;
}

.social-icon.qq {
  background: #12B7F5;
}

.social-icon.weibo {
  background: #E6162D;
}

.social-icon:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.social-icon:active {
  transform: translateY(0) scale(1);
}

/* 底部协议 */
.login-agreement {
  margin-top: auto;
  padding-top: 24px;
}

.agreement-checkbox {
  display: flex;
  align-items: flex-start;
  cursor: pointer;
  font-size: 13px;
  color: #666;
  line-height: 1.5;
}

@media (prefers-color-scheme: dark) {
  .agreement-checkbox {
    color: var(--text-secondary);
  }
}

.agreement-checkbox input[type="checkbox"] {
  display: none;
}

.checkbox-custom {
  width: 18px;
  height: 18px;
  border: 2px solid #d0d0d0;
  border-radius: 4px;
  margin-right: 8px;
  flex-shrink: 0;
  position: relative;
  transition: all 0.2s ease;
  margin-top: 2px;
}

@media (prefers-color-scheme: dark) {
  .checkbox-custom {
    border-color: rgba(255, 255, 255, 0.3);
  }
}

.agreement-checkbox input[type="checkbox"]:checked + .checkbox-custom {
  background: var(--primary-color);
  border-color: var(--primary-color);
}

.agreement-checkbox input[type="checkbox"]:checked + .checkbox-custom::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 12px;
  font-weight: bold;
}

.agreement-text {
  flex: 1;
}

.agreement-link {
  color: var(--primary-color);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.agreement-link:hover {
  opacity: 0.8;
  text-decoration: underline;
}

.login-form-content {
  padding: 32px 40px 24px;
  flex: 1;
  overflow-y: auto;
  background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.login-form-content .form-group {
  margin-bottom: 24px;
  position: relative;
  text-align: left;
}

.login-form-content .form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 10px;
  letter-spacing: -0.2px;
  text-align: left;
}

.login-form-content .form-label .required {
  color: var(--secondary-color);
  margin-right: 3px;
}

.login-form-content .form-input {
  width: 100%;
  height: 48px;
  padding: 0 18px;
  background: #ffffff;
  border: 2px solid #e8ecef;
  border-radius: 12px;
  font-size: 14px;
  color: var(--text-primary);
  outline: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: inherit;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.login-form-content .form-input:focus {
  border-color: var(--primary-color);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(78, 205, 196, 0.15), 0 4px 12px rgba(78, 205, 196, 0.1);
  transform: translateY(-1px);
}

.login-form-content .form-input::placeholder {
  color: #b0b8c1;
  font-weight: 400;
}

.login-form-content .form-input:hover:not(:focus) {
  border-color: #d0d5dd;
  background: #fafbfc;
}

/* 复选框样式 */
.form-options {
  margin-top: 8px;
  margin-bottom: 8px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-secondary);
  user-select: none;
  padding: 6px 10px;
  border-radius: 8px;
  transition: all var(--transition-fast);
}

.checkbox-label:hover {
  background: rgba(78, 205, 196, 0.06);
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--primary-color);
  border-radius: 4px;
}

.checkbox-text {
  color: var(--text-secondary);
  font-weight: 500;
}

/* 切换链接样式 */
.form-switch {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #e8ecef;
}

.form-switch span {
  color: var(--text-secondary);
}

.switch-link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  padding: 6px 12px;
  border-radius: 8px;
  background: rgba(78, 205, 196, 0.08);
}

.switch-link:hover {
  color: var(--primary-dark);
  background: rgba(78, 205, 196, 0.15);
  transform: translateY(-1px);
  text-decoration: none;
}

/* 按钮样式 */
.modal-submit-btn {
  min-width: 120px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 1px;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  box-shadow: 0 4px 14px rgba(78, 205, 196, 0.35);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 头像上传样式 */
.avatar-upload {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.avatar-preview {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: #f0f2f5;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 2px dashed #d0d5dd;
  flex-shrink: 0;
  transition: all var(--transition-fast);
}

.avatar-preview svg {
  width: 40px;
  height: 40px;
  color: #b0b8c1;
}

.avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.avatar-upload-btn {
  padding: 8px 16px;
  background: var(--primary-color);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.avatar-upload-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

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

.avatar-remove-btn {
  padding: 8px 16px;
  background: #fff;
  color: var(--secondary-color);
  border: 1.5px solid var(--secondary-color);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.avatar-remove-btn:hover {
  background: var(--secondary-color);
  color: #fff;
}

.avatar-tip {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 4px;
}

.modal-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(78, 205, 196, 0.45);
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-color) 100%);
}

.modal-submit-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(78, 205, 196, 0.3);
}

.modal-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.modal-cancel-btn {
  min-width: 100px;
  font-weight: 500;
  font-size: 14px;
  background: #f5f7fa;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.modal-cancel-btn:hover {
  background: #e8ecf1;
  color: var(--text-primary);
  transform: translateY(-1px);
}

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

/* 登录弹窗响应式设计 */
@media (max-width: 768px) {
  .login-modal {
    max-width: 95%;
    border-radius: 12px;
  }
  
  .login-header-bg {
    padding: 36px 24px 32px;
  }
  
  .login-site-title {
    font-size: 28px;
  }
  
  .login-welcome-text {
    font-size: 14px;
  }
  
  .login-main-content {
    padding: 24px 24px 32px;
  }
}

@media (max-width: 480px) {
  .login-modal {
    max-width: 100%;
    border-radius: 0;
    max-height: 100vh;
  }
  
  .login-header-bg {
    padding: 32px 20px 28px;
  }
  
  .login-site-title {
    font-size: clamp(22px, 6vw, 24px);
  }
  
  .login-welcome-text {
    font-size: 13px;
  }
  
  .login-main-content {
    padding: 20px 20px 28px;
  }
  
  .form-group.with-icon {
    padding: 12px 0;
  }
  
  .login-submit-btn {
    padding: 12px;
    font-size: 15px;
  }
}

/* 通用弹窗响应式优化 */
@media (max-width: 768px) {
  .modal-overlay {
    padding: 16px;
  }
  
  .modal, .feedback-modal, .evaluate-modal, .select-modal {
    max-height: 85vh;
  }
  
  .company-modal {
    max-width: 95%;
    max-height: 90vh;
  }
}

@media (max-width: 480px) {
  .modal-overlay {
    padding: 0px;
  }
  
  .modal {
    width: 95%;
    padding: 20px;
  }
  
  .feedback-modal, .evaluate-modal {
    width: 95%;
    max-height: 80vh;
  }
  
  .company-modal {
    width: 98%;
    max-height: 95vh;
  }
  
  /* 小屏幕弹窗内容优化 */
  .modal-title {
    font-size: 16px;
  }
  
  .modal-content {
    font-size: 13px;
  }
  
  .modal-buttons {
    flex-direction: column;
    gap: 8px;
  }
  
  .modal-btn {
    width: 100%;
  }
}

/* iOS设备特殊优化 */
@supports (-webkit-touch-callout: none) {
  .modal-overlay {
    position: fixed;
    height: 100vh;
    height: -webkit-fill-available;
  }
  
  .modal, .feedback-modal, .evaluate-modal, .select-modal, .login-modal, .company-modal {
    max-height: 80vh;
    max-height: -webkit-fill-available;
  }
}

/* 弹窗滚动条样式优化 */
.modal::-webkit-scrollbar,
.feedback-modal::-webkit-scrollbar,
.evaluate-modal::-webkit-scrollbar,
.select-modal::-webkit-scrollbar,
.login-modal::-webkit-scrollbar,
.company-modal::-webkit-scrollbar {
  width: 6px;
}

.modal::-webkit-scrollbar-track,
.feedback-modal::-webkit-scrollbar-track,
.evaluate-modal::-webkit-scrollbar-track,
.select-modal::-webkit-scrollbar-track,
.login-modal::-webkit-scrollbar-track,
.company-modal::-webkit-scrollbar-track {
  background: #f5f5f5;
  border-radius: 3px;
}

.modal::-webkit-scrollbar-thumb,
.feedback-modal::-webkit-scrollbar-thumb,
.evaluate-modal::-webkit-scrollbar-thumb,
.select-modal::-webkit-scrollbar-thumb,
.login-modal::-webkit-scrollbar-thumb,
.company-modal::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 3px;
  transition: background 0.3s ease;
}

.modal::-webkit-scrollbar-thumb:hover,
.feedback-modal::-webkit-scrollbar-thumb:hover,
.evaluate-modal::-webkit-scrollbar-thumb:hover,
.select-modal::-webkit-scrollbar-thumb:hover,
.login-modal::-webkit-scrollbar-thumb:hover,
.company-modal::-webkit-scrollbar-thumb:hover {
  background: #999;
}

/* 动画增强 */
@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.login-modal {
  animation: modalSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.show .modal:not(.login-modal):not(.feedback-modal):not(.evaluate-modal):not(.select-modal) {
  animation: modalFadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 输入框图标装饰（可选） */
.login-form-content .form-group::before {
  content: '';
  position: absolute;
  top: 38px;
  right: 14px;
  width: 20px;
  height: 20px;
  opacity: 0;
  transition: all var(--transition-fast);
  pointer-events: none;
}

.login-form-content .form-input:focus + .form-group::before,
.login-form-content .form-input:not(:placeholder-shown) + .form-group::before {
  opacity: 0.5;
}

/* 个人中心用户信息样式 */
.profile-name[data-logged-in="true"] {
  color: var(--text-primary);
  font-weight: 600;
}

/* ==================== 公告/帮助/联系我们列表样式（与评价弹窗一致）==================== */

/* 统一模态框内容区域样式 */
.evaluate-modal .modal-content,
.modal.evaluate-modal .modal-content {
  max-height: 500px;
  overflow-y: auto;
  padding: 0 8px;
  margin-bottom: 0;
}

/* ==================== 系统设置弹窗样式 ==================== */
.settings-modal {
  max-width: 480px;
}

/* ========== 企业信息弹窗样式 ========== */
.company-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

/* 知识库页面样式 */
.knowledge-banner {
  position: relative;
  overflow: hidden;
  height: 200px;
  border-radius: 12px;
  margin: 0 0 10px;
  padding: 0;
  background: #ffffff;
  border: 1px solid #ececec;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  box-sizing: border-box;
}

/* 响应式适配 */
@media (max-width: 768px) {
  .company-modal {
    width: 95%;
    max-height: 95vh;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .company-modal-header {
    padding: 16px 20px;
  }

  .company-modal-body {
    padding: 20px;
  }

  .company-modal-footer {
    padding: 12px 20px;
  }

  .company-modal-btn {
    flex: 1;
    padding: 12px 20px;
  }
}

.page-content-inner {
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.form-btn {
  flex: 1;
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
  font-family: inherit;
}

.form-btn.primary {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: #fff;
}

.form-btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(78, 205, 196, 0.3);
}

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

.form-btn.primary:disabled {
  background: #e8e8e8 !important;
  color: #999 !important;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.form-btn.secondary {
  background: #f5f5f5;
  color: var(--text-secondary);
}

.form-btn.secondary:hover {
  background: #eee;
}

.form-btn.secondary:active {
  background: #e8e8e8;
}

.feedback-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.announcement-list,
.help-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.account-info-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.settings-user-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px;
  background: linear-gradient(135deg, rgba(78, 205, 196, 0.1) 0%, rgba(78, 205, 196, 0.05) 100%);
  border-radius: 16px;
  margin-bottom: 20px;
}

.about-contact-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
}

/* index.html 模板迁移样式 */
html {
  color-scheme: light dark;
}

.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background:
    radial-gradient(circle at 18% 15%, rgba(var(--primary-light-rgb), .24), transparent 28%),
    radial-gradient(circle at 84% 78%, rgba(var(--primary-rgb), .22), transparent 30%),
    linear-gradient(135deg, rgba(var(--primary-rgb), .10) 0%, #f5f7fb 52%, rgba(var(--primary-light-rgb), .16) 100%);
}

body.is-authenticated .auth-gate {
  display: none;
}

.is-hidden {
  display: none !important;
}

.is-hidden[style*="display: block"] {
  display: block !important;
}

.is-hidden[style*="display: flex"] {
  display: flex !important;
}

.is-hidden[style*="display: grid"] {
  display: grid !important;
}

.profile-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.section-title-icon {
  margin-right: 8px;
  color: #4ecdc4;
  font-size: 16px;
}

.tool-order-contact {
  order: 98;
}

.tool-order-clear-cache {
  order: 99;
}

/* index.html 原 head 内联登录弹窗样式 */
.modal-overlay:has(.login-modal) {
  padding: 0;
  display: flex;
  align-items: stretch;
  justify-content: center;
  overflow: hidden;
  background: #e5e5e5;
}

.modal-overlay:has(.login-modal)::before {
  display: none;
}

.login-modal,
.modal-overlay.show .login-modal {
  position: relative;
  inset: auto;
  width: 100%;
  height: 100dvh;
  max-width: 440px;
  max-height: 100dvh;
  min-width: 0;
  margin: 0 auto;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: linear-gradient(180deg, #fbfffd 0%, #ffffff 40%, #fbfbfb 100%);
  box-shadow: none;
  color: #26332d;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  transform: none;
}

.modal-overlay.show .login-modal::before {
  display: none;
}

.modal-overlay.login-mode-switch-forward,
.modal-overlay.login-mode-switch-back {
  opacity: 1;
  visibility: visible;
}

.login-mode-switch-forward .login-modal {
  animation: loginSlideInForward .24s ease-out both;
}

.login-mode-switch-back .login-modal {
  animation: loginSlideInBack .24s ease-out both;
}

.login-modal.login-switch-leave-forward {
  animation: loginSlideOutForward .18s ease-in both;
}

.login-modal.login-switch-leave-back {
  animation: loginSlideOutBack .18s ease-in both;
}

@keyframes loginSlideInForward {
  from { opacity: 0; transform: translateX(32px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes loginSlideOutForward {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(-32px); }
}

@keyframes loginSlideInBack {
  from { opacity: 0; transform: translateX(-32px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes loginSlideOutBack {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(32px); }
}

.login-header-actions {
  position: absolute;
  top: calc(40px + var(--app-safe-area-top, 0px));
  right: 20px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 10px;
}

.login-portal-switch {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  padding: 0 12px;
  border: 1px solid rgba(255,255,255,.5);
  border-radius: 15px;
  background: rgba(255,255,255,.2);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all .25s cubic-bezier(.4, 0, .2, 1);
  position: relative;
  overflow: hidden;
}

.login-portal-switch::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255,255,255,.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width .4s ease, height .4s ease;
}

.login-portal-switch:hover {
  background: rgba(255,255,255,.3);
  border-color: rgba(255,255,255,.7);
  box-shadow: 0 4px 15px rgba(0,0,0,.15);
  transform: translateY(-1px);
}

.login-portal-switch:hover::before {
  width: 200px;
  height: 200px;
}

.login-portal-switch:hover i {
  transform: rotate(180deg);
}

.login-portal-switch:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.login-portal-switch i {
  font-size: 12px;
  transition: transform .3s ease;
}

.login-portal-switch span {
  position: relative;
  z-index: 1;
}

.login-portal-switch:active {
  transform: scale(.94) translateY(0);
  transition-duration: .1s;
}

.login-close-btn {
  position: static;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.45);
  border-radius: 50%;
  background: rgba(255,255,255,.18);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: background .18s ease, transform .18s ease;
}

.login-close-btn:active {
  transform: scale(.94);
}

.login-header-bg {
  position: relative;
  height: 236px;
  padding: 0px 30px 0;
  overflow: hidden;
  border-radius: 0;
  text-align: left;
  color: #fff;
  background: url('../../images/login/dl1.jpg?v=20260702') no-repeat center center / cover;
  cursor: default;
}

.login-header-bg::before,
.login-header-bg::after {
  content: none;
  display: none;
}

@keyframes login-float {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-7px) rotate(1.2deg); }
}

.login-site-title {
  position: relative;
  z-index: 2;
  max-width: none;
  margin: 78px 0 0;
  color: #fff;
  font-size: clamp(22px, 6vw, 29px);
  line-height: 1.12;
  font-weight: 900;
  letter-spacing: .2px;
  white-space: nowrap;
  text-shadow: 0 8px 22px rgba(28, 116, 78, .22);
}

.login-welcome-text {
  position: relative;
  z-index: 2;
  max-width: 190px;
  margin: 12px 0 0;
  color: rgba(255,255,255,.96);
  font-size: 14px;
  line-height: 1.4;
  letter-spacing: .1px;
  text-shadow: 0 6px 18px rgba(28, 116, 78, .18);
}

.login-main-content {
  position: absolute;
  left: 0;
  right: 0;
  top: 174px;
  bottom: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  padding: 0 24px 0;
  overflow-y: auto;
  border: 1px solid rgba(255,255,255,.88);
  border-radius: 24px 24px 0 0;
  background: linear-gradient(180deg, rgba(255,255,255,.99), #fff 48%, #fbfffd);
  box-shadow: 0 22px 48px rgba(31, 93, 66, .11);
  backdrop-filter: blur(18px);
}

.login-main-content::before {
  display: none;
}

.login-main-content::after {
  display: none;
}

.login-modal .login-form-wrapper {
  position: relative;
  z-index: 1;
  display: flex;
  flex: none !important;
  flex-direction: column;
  padding-top: 0;
}

.login-tabs {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  z-index: 2;
  height: 58px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 24px 24px 0 0;
  background: linear-gradient(180deg, rgba(248,255,251,.96), rgba(255,255,255,.72));
  box-shadow: inset 0 -1px 0 rgba(var(--primary-rgb), .18);
  overflow: hidden;
}

.login-tab {
  position: relative;
  height: 58px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #8a9a92;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  transition: color .22s ease, background .22s ease, box-shadow .22s ease, transform .2s ease;
}

.login-tab.active {
  background: linear-gradient(180deg, #fff 0%, #fbfffd 100%);
  color: var(--primary-color);
  font-weight: 900;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.95);
}

.login-tab.active:first-child {
  border-bottom-right-radius: 28px;
  box-shadow: 18px 0 34px rgba(var(--primary-rgb), .16), inset 0 1px 0 rgba(255,255,255,.95);
}

.login-tab.active:last-child {
  border-bottom-left-radius: 28px;
  box-shadow: -18px 0 34px rgba(var(--primary-rgb), .16), inset 0 1px 0 rgba(255,255,255,.95);
}

.login-tab.active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 9px;
  width: 34px;
  height: 4px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--primary-light), var(--primary-color));
  transform: translateX(-50%);
  box-shadow: 0 5px 14px rgba(var(--primary-rgb), .38);
}

.login-tab:active {
  transform: scale(.98);
}

.login-tab:not(.active):hover {
  color: #4f6259;
  background: rgba(255,255,255,.34);
}

.login-modal .login-panel {
  display: none;
  margin-top: 75px;
}

.login-modal .login-panel.active {
  display: block;
}

.form-group.with-icon,
.login-form-content .form-group {
  margin-bottom: 16px;
  padding: 0;
  border: 0;
  text-align: left;
}

.form-group.with-icon .form-label,
.login-form-content .form-label {
  display: block;
  margin: 0 0 8px 7px;
  color: #3f5148;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.4;
}

.form-group.with-icon .form-label i {
  display: none;
}

.login-input,
.login-form-content .form-input,
.captcha-input {
  width: 100%;
  height: auto;
  line-height: 1.5;
  padding: 13px 18px !important;
  border: 1px solid rgba(205, 225, 215, .9);
  border-radius: 23px;
  outline: 0;
  background: linear-gradient(180deg, #fdfffe, #f4faf7);
  color: #26332d;
  font-size: 14px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.98), 0 7px 16px rgba(55, 120, 87, .04);
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease, transform .2s ease;
  -webkit-appearance: none;
  appearance: none;
}

.login-input:focus,
.login-form-content .form-input:focus,
.captcha-input:focus {
  border-color: rgba(var(--primary-rgb), .62);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(var(--primary-rgb), .10), 0 12px 24px rgba(var(--primary-rgb), .10), inset 0 1px 0 rgba(255,255,255,.95);
  transform: translateY(-1px);
}

.login-input::placeholder,
.login-form-content .form-input::placeholder,
.captcha-input::placeholder {
  color: #b7c4be;
}

.captcha-group {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  padding: 0;
  border: 0;
}

.captcha-input-wrapper {
  flex: 1;
}

.captcha-icon {
  display: none;
}

.captcha-question {
  min-width: 92px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border: 1px solid rgba(216, 232, 224, .86);
  border-radius: 23px;
  background: linear-gradient(180deg, #fbfefd, #f2faf6);
  color: #27c970;
  font-size: 15px;
  font-weight: 900;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.95), 0 8px 18px rgba(55, 120, 87, .045);
}

.sms-code-group {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  margin-bottom: 12px;
}

.sms-code-input-wrap {
  flex: 1;
  min-width: 0;
}

.sms-code-input-wrap .form-label {
  display: block;
  margin: 0 0 8px 7px;
  padding: 0;
  color: #3f5148;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.4;
  text-align: left;
}

.sms-code-btn {
  width: 104px;
  height: 46px;
  border: 1px solid rgba(var(--primary-rgb), .26);
  border-radius: 23px;
  background: linear-gradient(180deg, #ffffff, rgba(var(--primary-rgb), .06));
  color: var(--primary-color);
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 7px 16px rgba(55, 120, 87, .04);
  transition: transform .18s ease, box-shadow .18s ease;
}

.sms-code-btn:active {
  transform: scale(.98);
}

.sms-login-tip {
  margin: 0 0 22px 7px;
  color: #a2b0a9;
  font-size: 12px;
  line-height: 1.5;
}

.login-submit-btn {
  position: relative;
  width: 100%;
  height: 48px;
  margin-top: 2px;
  overflow: hidden;
  border: 0;
  border-radius: 24px;
  background: linear-gradient(100deg, var(--primary-light) 0%, var(--primary-color) 55%, var(--primary-dark) 100%);
  box-shadow: 0 14px 24px rgba(var(--primary-rgb), .28), inset 0 1px 0 rgba(255,255,255,.28);
  color: #fff;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: .6px;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease;
}

.login-submit-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 0 35%, rgba(255,255,255,.35) 48%, transparent 62%);
  transform: translateX(-120%);
  transition: transform .7s ease;
}

.login-submit-btn:hover::before {
  transform: translateX(120%);
}

.login-submit-btn:hover {
  opacity: 1;
  transform: translateY(-1px);
  box-shadow: 0 20px 34px rgba(var(--primary-rgb), .34), inset 0 1px 0 rgba(255,255,255,.28);
}

.login-submit-btn:active {
  transform: translateY(1px) scale(.99);
  box-shadow: 0 9px 18px rgba(var(--primary-rgb), .25), inset 0 1px 0 rgba(255,255,255,.2);
}

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

.login-submit-btn i {
  display: none;
}

.login-switch-mode {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 18px;
  margin-bottom: 30px;
  padding: 12px 14px;
  font-size: 13px;
  color: #64748b;
  background: linear-gradient(135deg, rgba(var(--primary-rgb), .08), rgba(var(--primary-light-rgb), .1));
  border: 1px solid rgba(var(--primary-rgb), .16);
  border-radius: 18px;
}

.login-switch-mode:has(.forgot-password-link) {
  justify-content: space-between;
  background: transparent;
  border-color: transparent;
  padding: 0 4px;
}

.switch-link-text,
.forgot-password-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 16px;
  color: var(--primary-dark);
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  font-weight: 800;
  text-decoration: none;
  transition: color .18s ease, transform .18s ease;
}

.switch-link-text:hover {
  color: var(--primary);
}

.forgot-password-link {
  color: #64748b;
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  font-weight: 700;
}

.switch-link-text:hover,
.forgot-password-link:hover {
  color: var(--primary-dark);
  background: rgba(var(--primary-rgb), .08);
  border-color: rgba(var(--primary-rgb), .28);
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(var(--primary-rgb), .16);
  opacity: 1;
  text-decoration: none;
}

.forgot-password-link:hover {
  color: var(--primary-dark);
  box-shadow: none;
}

.login-modal .third-party-login {
  margin-top: auto;
  margin-bottom: 30px;
  padding-top: 0;
  width: 100%;
  text-align: center;
}

.login-modal .divider {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  gap: 16px;
  color: #a0a0a0;
  font-size: 13px;
  text-align: center;
}

.login-modal .divider::before,
.login-modal .divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e5e5e5;
}

.login-modal .divider span {
  padding: 0;
  color: #a0a0a0;
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  white-space: nowrap;
}

.login-modal .social-login-icons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 36px;
  width: 100%;
}

.login-modal .social-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #fff;
  font-size: 22px;
  font-weight: 400;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .12);
  cursor: pointer;
  transition: transform .18s ease, filter .18s ease, box-shadow .18s ease;
}

.login-modal .social-icon.wechat { background: #07C160; }
.login-modal .social-icon.qq { background: #12B7F5; }
.login-modal .social-icon.weibo { background: #E6162D; }

.login-modal .social-icon:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, .18);
}

.login-modal:has(#regPhone) .login-header-bg {
  height: 162px;
}

.login-modal:has(#regPhone) .login-site-title {
  margin-top: 58px;
  font-size: clamp(22px, 6vw, 29px);
}

.login-modal:has(#regPhone) .login-header-bg::after {
  width: 104px;
  height: 104px;
  top: 34px;
}

.login-modal:has(#regPhone) .login-main-content {
  left: 50%;
  right: auto;
  width: calc(100% - 40px);
  max-width: 338px;
  top: 40px;
  bottom: 24px;
  padding-top: 30px;
  border-radius: 24px;
  transform: translateX(-50%);
}

.login-modal:has(#regPhone) .login-main-content::before,
.login-modal:has(#regPhone) .login-main-content::after {
  display: none;
}

.login-modal:has(#regPhone) .form-group.with-icon {
  margin-bottom: 14px;
}

.login-modal:has(#regPhone) .login-input {
  height: 44px;
}

@media (max-width: 430px) {
  .modal-overlay:has(.login-modal) {
    background: #fff;
  }

  .modal-overlay:has(.login-modal)::before {
    display: none;
  }

  .login-modal,
  .modal-overlay.show .login-modal {
    width: 100vw;
    height: 100vh;
    max-width: 100vw;
    max-height: 100vh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .login-header-bg {
    border-radius: 0;
  }

  .login-main-content {
    left: 20px;
    right: 20px;
    bottom: 0;
  }

  .login-modal:has(#regPhone) .login-main-content {
    left: 50%;
    right: auto;
    bottom: 24px;
  }
}

@media (max-height: 760px) {
  .login-header-bg {
    height: 210px;
  }

  .login-site-title {
    margin-top: 64px;
    font-size: clamp(22px, 6vw, 27px);
  }

  .login-header-bg::after {
    width: 116px;
    height: 116px;
    top: 52px;
  }

  .login-main-content {
    top: 154px;
    bottom: 0;
  }

  .login-panel {
    margin-top: 76px;
  }

  .form-group.with-icon,
  .login-form-content .form-group {
    margin-bottom: 13px;
  }

  .third-party-login {
    padding-top: 12px;
  }
}

/* App 状态栏安全区适配 */
:root {
  --app-safe-area-top: env(safe-area-inset-top, 0px);
}

body {
  min-height: 100dvh;
}

.banner {
  padding-top: calc(120px + var(--app-safe-area-top));
}

#pageMy .banner {
  /* padding-top / margin-top 已在主规则里通过 var(--app-safe-area-top) 兼容 App 与 H5 */
}

.page-content {
  /* 顶部间距与个人中心（#pageMy .banner 的 margin-top）保持一致 */
  padding-top: calc(12px + var(--app-safe-area-top, 0px));
}

/* App 环境下（有真实状态栏高度）同样与个人中心保持一致 */
.is-plus-app .page-content {
  padding-top: calc(12px + var(--app-safe-area-top, 0px));
}

#pageMy {
  padding-top: 0;
}

.login-header-actions {
  top: 18px;
}

.login-close-btn {
  top: auto;
}

.login-site-title {
  margin-top: 78px;
}

@media (max-height: 760px) {
  .login-site-title {
    margin-top: 64px;
  }
}

/* 用户端多端布局适配：仅调整结构尺寸，不改变视觉样式 */
html {
  min-height: 100%;
  background: linear-gradient(180deg, #c3cfe2 0%, #f5f7fa 100%);
}

body {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  padding-bottom: calc(112px + env(safe-area-inset-bottom));
}

.banner,
.action-section,
.page-content,
.bottom-nav {
  width: 100%;
  max-width: 440px;
  margin-left: auto;
  margin-right: auto;
}

.bottom-nav {
  left: 50%;
  right: auto;
  width: 100%;
  max-width: 440px;
  transform: translateX(-50%);
}

.action-section {
  flex-wrap: nowrap;
}

.action-btn {
  min-width: 0;
  white-space: nowrap;
}

.page-content {
  min-height: calc(100dvh - 75px);
  padding-bottom: calc(50px + env(safe-area-inset-bottom));
}

.repair-tabs {
  overflow-x: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  justify-content: safe center;
}

.repair-tab {
  min-width: 0;
  flex: 1 1 0;
}

.repair-item-header,
.asset-list-top,
.detail-header,
.modal-header {
  min-width: 0;
}

.repair-time,
.repair-status,
.asset-status,
.detail-title,
.modal-title {
  flex-shrink: 0;
}

.repair-title-text,
.repair-location span,
.repair-desc,
.repair-order,
.form-value,
.form-detail,
.tool-name,
.nav-text {
  overflow-wrap: anywhere;
}

.form-bg-container,
.page-content-inner,
.feedback-form,
.repair-list,
.status-list,
.asset-list {
  width: 100%;
  min-width: 0;
}

.form-image-wrap,
.priority-options,
.feedback-type-grid,
.tools-grid,
.asset-info-grid,
.schedule-summary-grid {
  min-width: 0;
}

.modal-overlay,
.company-modal-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  max-width: none;
  min-height: 100dvh;
  margin: 0;
  left: 0;
  right: 0;
  transform: none;
}

.auth-gate,
.loading-overlay {
  width: 100vw;
  max-width: none;
  left: 0;
  right: 0;
  margin: 0;
}

.toast-container {
  width: auto;
  max-width: min(90vw, 440px);
  left: 50%;
  right: auto;
  transform: translate(-50%, -50%);
}

@media (min-width: 441px) {
  .banner,
  .page-content,
  #pageAssetAdd,
  #pageMy {
    box-shadow: 0 0 24px rgba(0, 0, 0, 0.04);
  }
}

@media (max-width: 430px) {
  .banner-title {
    font-size: clamp(22px, 7vw, 30px);
    letter-spacing: 1px;
  }

  .banner-subtitle {
    font-size: 15px;
    letter-spacing: 1.5px;
  }

  .action-section {
    gap: 12px;
    padding-left: 18px;
    padding-right: 18px;
  }

  .action-btn {
    height: 54px;
    font-size: 15px;
    gap: 6px;
  }

  .action-btn svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
  }

  .page-content {
    padding-left: 16px;
    padding-right: 16px;
  }

  .repair-tabs {
    margin-left: 0;
    margin-right: 0;
    gap: 2px;
    padding: 6px;
  }

  .repair-tab {
    font-size: 11px;
    padding: 6px 2px;
    gap: 3px;
  }

  .repair-count {
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    font-size: 10px;
  }

  .repair-item-header {
    align-items: flex-start;
    gap: 8px;
  }

  .repair-progress {
    overflow-x: visible;
    justify-content: space-between;
    width: 100%;
    box-sizing: border-box;
  }

  .progress-step {
    min-width: 0;
    width: 44px;
    flex: 0 0 44px;
  }

  .progress-line {
    min-width: 12px;
    flex: 1 1 0;
    margin: 0 2px;
    margin-bottom: 20px;
  }

  .repair-item-footer,
  .modal-buttons,
  .feedback-modal .modal-footer,
  .company-modal .modal-footer {
    flex-wrap: wrap;
  }

  .repair-evaluate-btn,
  .repair-confirm-btn,
  .modal-btn,
  .feedback-modal .modal-btn,
  .company-modal .modal-btn {
    min-width: 0;
  }
}

@media (max-width: 360px) {
  .banner {
    padding-left: 14px;
    padding-right: 14px;
  }

  .action-section {
    padding-left: 14px;
    padding-right: 14px;
  }

  .action-btn {
    font-size: 14px;
  }

  .bottom-nav .nav-item {
    padding-left: 0;
    padding-right: 0;
  }

  .repair-tab {
    min-width: 66px;
    font-size: 12px;
  }

  .repair-count {
    width: 22px;
    height: 22px;
  }

  .tools-grid {
    gap: 0;
  }
}

@media (orientation: landscape) and (max-height: 500px) {
  .banner {
    padding-top: calc(50px + var(--app-safe-area-top));
    padding-bottom: 50px;
  }

  .action-section {
    margin-top: 92px;
  }

  .scan-page {
    padding-top: calc(16px + var(--app-safe-area-top));
  }

  .scan-frame {
    width: min(220px, 42vh);
    height: min(220px, 42vh);
  }
}

/* ===== 首页（Home）整体改版：完全按参考图重写，仅作用于 body > section.banner.home-page 及其后紧邻的空 action-section，不影响其他任何页面 ===== */

/* 首页背景：随文档高度自适应铺满，兼容 Android WebView（fixed attachment 在部分 WebView 下会失效） */
html:has(body > section.banner.home-page) {
  min-height: 100%;
  background: linear-gradient(180deg, #667eea 0%, #764ba2 100%) no-repeat top center;
  background-attachment: scroll;
  background-size: 100% 100%;
}

/* ============= 用户协议 & 隐私政策 ============= */
#userAgreementContent,
#privacyPolicyContent {
  padding: 14px 16px 32px;
}

/* ============= 开发者支持 ============= */
#openApiContent {
  padding: 14px 16px 32px;
}


/* ================= 新闻资讯页面 ================= */
#pageNews .detail-header {
  position: relative;
}

/* ============= 新手引导 ============= */
#newbieGuideContent {
  padding: 14px 16px 32px;
}

/* ===================== 信息页面（消息中心） ===================== */
#pageMessage {
  /* 顶部间距与知识库/我的等页面保持一致：12px + App 状态栏安全区 */
  padding: calc(12px + var(--app-safe-area-top, 0px)) 16px 0;
  min-height: 100dvh;
}

/* 资产详情独立页面 —— 复用报修详情视觉风格 */
.asset-detail-page {
  display: none;
  flex-direction: column;
  background: transparent;
  padding: calc(12px + var(--app-safe-area-top, 0px)) 16px 0;
  padding-bottom: calc(var(--nav-item-size, 70px) + env(safe-area-inset-bottom, 0px) + 12px);
}
.asset-detail-page:not(.is-hidden) {
  display: flex;
}
.asset-detail-page .detail-header {
  margin: 0 0 12px;
  padding: 10px 18px;
  border-radius: 14px;
  box-shadow: none;
}
.asset-detail-page .detail-title {
  flex: 1;
  text-align: center;
  font-size: 18px;
}
.asset-detail-page .detail-back-btn {
  width: 36px;
  height: 36px;
}
.asset-detail-page .asset-detail-page-inner {
  padding: 0;
  background: transparent;
  overflow: visible;
}

/* 底部操作栏（紧贴资产详情下方，独立卡片容器） */
.asset-detail-page .asset-detail-footer {
  position: static;
  width: auto;
  max-width: none;
  margin: 12px 0 0;
  padding: 12px 14px;
  border-radius: 16px;
  background: #fff;
  border-top: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
