/* 全局样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  background-color: #f5f7fa;
  overflow: hidden;
}



/* 登录页面样式 */
.login-container {
  width: 100%;
  min-height: 100vh;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  z-index: 9999;
  position: relative;
}

.login-box {
  display: flex;
  position: relative;
  width: 100%;
  max-width: 700px;
  min-height: 360px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  z-index: 10000;
}

.left-section {
  flex: 1;
  background: rgb(0, 225, 255);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
  color: white;
  z-index: 10001;
}

.logo-container {
  text-align: center;
  z-index: 10002;
}

.logo {
  margin-bottom: 20px;
}

.logo-text h2 {
  font-size: 1.2rem;
  font-weight: 600;
  z-index: 10003;
}

.logo-text img {
  width: 100px;
  height: 100px;
  margin-bottom: 10px;
  z-index: 10004;
}

.right-section {
  flex: 1;
  padding: 40px 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  z-index: 10005;
}

.login-form {
  text-align: center;
  z-index: 10006;
}

.login-form h1 {
  font-size: 1.5rem;
  margin-bottom: 8px;
  color: #333;
  font-weight: 500;
  z-index: 100;
}

.login-form p {
  color: #666;
  margin-bottom: 30px;
  font-size: 0.8rem;
  z-index: 100;
}

.form-group {
  margin-bottom: 15px;
  text-align: left;
  z-index: 100;
}

.input-wrapper {
  position: relative;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  transition: all 0.3s;
  background-color: white;
  z-index: 100;
  /* 移除overflow: hidden，确保图标显示 */
  display: flex;
  align-items: center;
}

.input-wrapper:focus-within {
  border-color: #1890ff;
  box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}

.phone-input::before {
  content: "📱";
  color: #666;
  font-size: 16px;
  z-index: 100;
  pointer-events: none;
  display: inline-block;
  width: 20px;
  text-align: center;
  margin-left: 6px;
}

.password-input::before {
  content: "🔒";
  color: #666;
  font-size: 16px;
  z-index: 100;
  pointer-events: none;
  display: inline-block;
  width: 20px;
  text-align: center;
  margin-left: 6px;
}

.input-icon {
  color: #666;
  font-size: 16px;
  z-index: 100;
  pointer-events: none;
  display: inline-block;
  width: 20px;
  text-align: center;
  margin: 0 12px;
  flex-shrink: 0;
}



.eye-icon {
  font-size: 16px;
  color: #999;
  z-index: 10013;
  display: inline-block;
  width: 20px;
  text-align: center;
}

.toggle-password {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10014;
}

/* 表单行样式 */
.form-row {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
}

.form-row .form-group {
  flex: 1;
  margin-bottom: 0;
}

.form-input {
  flex: 1;
  padding: 12px;
  border: none;
  border-radius: 4px;
  font-size: 13px;
  outline: none;
 

  min-width: 0;
}

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 30px;
}

.copyright {
  margin-top: 40px;
  text-align: center;
  font-size: 0.7rem;
  color: #999;
  background: #f5f5f5;
  padding: 8px;
  border-radius: 4px;
  align-self: center;
  width: 100%;
}

/* 仪表盘页面样式 */
.dashboard {
  min-height: 100vh;
  background-color: #f5f7fa;
  display: none;
  flex-direction: column;
  font-family: Arial, sans-serif;
}

/* 顶部导航栏 */
.top-nav {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 0 30px;
  height: 60px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.top-nav-left {
  display: flex;
  align-items: center;
}

.top-nav-left h1 {
  font-size: 20px;
  font-weight: bold;
  margin: 0;
}

.top-nav-left img {
  width: 30px;
  height: 30px;
  margin-right: 10px;
}

.top-nav-right {
  display: flex;
  align-items: center;
}

.user-avatar-container {
  position: relative;
  cursor: pointer;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.2);
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.3s ease;
}

.user-avatar:hover {
  transform: scale(1.05);
}

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

.user-avatar span {
  font-size: 20px;
}

.user-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 10px;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  min-width: 150px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  transition-delay: 0s, 0s;
  z-index: 1000;
  border: 1px solid #e0e0e0;
}

.user-avatar-container:hover .user-dropdown {
  opacity: 1;
  visibility: visible;
  transition-delay: 0s, 0s;
  animation: slideDown 0.2s ease-in-out;
}

.user-avatar-container:not(:hover) .user-dropdown {
  transition-delay: 0.02s, 0.02s;
}

.dropdown-item {
  padding: 10px 15px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  font-size: 14px;
  color: #333;
  border-bottom: 1px solid #f0f0f0;
  text-align: center;
}

.dropdown-item:last-child {
  border-bottom: none;
  border-radius: 0 0 8px 8px;
}

.dropdown-item:hover {
  background-color: #f5f7fa;
  color: #667eea;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 主容器 */
.dashboard-container {
  display: flex;
  flex: 1;
  height: calc(100vh - 60px);
  gap: 20px;
  padding: 0 20px 0 0;
}

/* 左侧导航栏 */
.side-nav {
  width: 200px;
  background-color: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 20px 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  cursor: pointer;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
}

.nav-item:hover {
  background-color: #f5f7fa;
}

.nav-item.active {
  background-color: #f0f4ff;
  border-left-color: #667eea;
  color: #667eea;
}

/* 导航项内容 */
.nav-item-content {
  display: flex;
  align-items: center;
  padding: 10px 20px;
  width: 100%;
}

/* 带下拉菜单的导航项 */
.nav-item.has-dropdown {
  position: relative;
}

/* 下拉菜单容器 */
.nav-dropdown {
  display: none;
  width: 100%;
  background-color: #ffffff;
  border-right: 1px solid #e0e0e0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  z-index: 100;
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s ease-in-out;
}

/* 显示下拉菜单 */
.nav-item.has-dropdown.active .nav-dropdown {
  display: block;
  max-height: 200px;
  animation: slideDown 0.2s ease-in-out;
}

/* 子导航项样式 */
.nav-subitem {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 10px 20px 10px 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  background-color: #ffffff;
  border-left: 3px solid transparent;
  color: #333333;
  text-align: center;
  width: 100%;
}

.nav-subitem:hover {
  background-color: #f5f7fa;
  color: #667eea;
}

.nav-subitem.active {
  background-color: #f0f4ff;
  border-left-color: #667eea;
  color: #667eea;
}

.nav-icon {
  margin-right: 10px;
  font-size: 18px;
}

.nav-text {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
}

.nav-arrow {
  font-size: 12px;
  color: #999;
}

.version-info {
  padding: 5px;
  font-size: 12px;
  color: #999;
  text-align: center;
  border-top: 1px solid #e0e0e0;
  margin-top: auto;
  line-height: 1.5;
}

/* 右侧内容区 */
.main-content {
  width: 100%;
  height: calc(100vh - 100px);
  margin: 15px auto;
  padding: 5px 30px;
  display: flex;
  flex-direction: column;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  overflow-y: auto;
}

.page-content {
  width: 100%;
}

.page-header {
  margin-bottom: 30px;
}

.page-header h2 {
  font-size: 20px;
  font-weight: bold;
  color: #333;
  margin: 0;
}



/* 统计卡片 */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background-color: white;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.stat-number {
  font-size: 36px;
  font-weight: bold;
  color: #667eea;
  margin: 0 0 10px 0;
}

.stat-label {
  font-size: 14px;
  color: #666;
  margin: 0;
}

.footer-copyright {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  text-align: center;
  padding: 10px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
  background-color: transparent;
  z-index: 10;
}

/* 登录加载动画 */
.login-loading {
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: rgba(255, 255, 255, 0.95);
  padding: 20px 40px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  animation: fadeIn 0.3s ease-in-out;
  z-index: 10010;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(102, 126, 234, 0.3);
  border-radius: 50%;
  border-top: 4px solid #667eea;
  animation: spin 1s linear infinite;
  margin-bottom: 10px;
}

.login-loading p {
  color: #667eea;
  font-size: 14px;
  font-weight: 500;
  margin: 0;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* 个人信息弹窗样式 */
.user-info-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  backdrop-filter: blur(5px);
  animation: fadeIn 0.3s ease-in-out;
}

.user-info-content {
  background: white;
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  animation: slideIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  overflow: hidden;
}

.user-info-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.user-info-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: bold;
  color: white;
}



.user-info-body {
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.user-info-body .form-group {
  margin-bottom: 0;
}

.user-info-body .form-group.full-width {
  width: 100%;
}

.user-info-body label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 500;
  color: #333;
}

.user-info-body .form-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  font-size: 14px;
  transition: all 0.3s ease;
}

.user-info-body .form-input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

.user-info-body .form-textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  font-size: 14px;
  resize: vertical;
  min-height: 80px;
  transition: all 0.3s ease;
}

.user-info-body .form-textarea:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

.user-info-footer {
  padding: 20px 30px;
  background-color: #f9f9f9;
  border-top: 1px solid #e0e0e0;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}



/* 响应式设计 */
@media (max-width: 768px) {
  /* 登录页面响应式 */
  .login-box {
    flex-direction: column;
  }
  
  .left-section {
    padding: 30px;
  }
  
  .right-section {
    padding: 40px 30px;
  }
  
  .form-actions {
    flex-direction: column;
  }
  
  .btn {
    width: 100%;
  }

  /* 仪表盘页面响应式 */
  .top-nav {
    padding: 0 20px;
  }
  
  .top-nav-left h1 {
    font-size: 18px;
  }
  
  .side-nav {
    width: 180px;
  }
  
  .nav-item {
    padding: 12px 15px;
  }
  
  .nav-text {
    font-size: 13px;
  }
  
  .main-content {
    padding: 20px;
  }
  
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .stat-card {
    padding: 20px;
  }
  
  .stat-number {
    font-size: 28px;
  }
}

@media (max-width: 480px) {
  /* 登录页面响应式 */
  .login-container {
    padding: 10px;
  }
  
  .left-section,
  .right-section {
    padding: 20px;
  }
  
  .login-form h1 {
    font-size: 1.5rem;
  }
  
  .form-input {
    padding: 10px 10px 10px 32px;
  }
  
  .btn {
    padding: 10px;
  }
  
  .copyright {
    margin-top: 40px;
  }

  /* 仪表盘页面响应式 */
  .top-nav {
    padding: 0 15px;
  }
  
  .top-nav-left h1 {
    font-size: 16px;
  }
  
  .dashboard-container {
    flex-direction: column;
  }
  
  .side-nav {
    width: 100%;
    height: auto;
    flex-direction: row;
    padding: 10px 0;
    overflow-x: auto;
    border-right: none;
    border-bottom: 1px solid #e0e0e0;
  }
  
  .nav-item {
    flex-direction: column;
    padding: 10px 15px;
    border-left: none;
    border-bottom: 3px solid transparent;
  }
  
  .nav-item.active {
    border-left: none;
    border-bottom-color: #667eea;
  }
  
  .nav-text {
    font-size: 12px;
    margin-top: 5px;
  }
  
  .nav-arrow {
    display: none;
  }
  
  .version-info {
    display: none;
  }
  
  .main-content {
    padding: 15px;
    flex: 1;
  }
  
  .stats {
    grid-template-columns: 1fr;
  }
  
  .stat-card {
    padding: 15px;
  }
  
  .stat-number {
    font-size: 24px;
  }
}