/* Common styles for header and footer */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  min-width: 1300px; /* 添加最小宽度，避免小窗口时页面拥挤 */
  display: flex;
  flex-direction: column;
  padding-top: 70px; /* 根据header高度调整 */
}

/* 取消a标签默认下划线 */
a {
  text-decoration: none;
}

/* 自定义消息提示框 */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 300px;
}

.toast {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-radius: 4px;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16);
  color: #fff;
  transform: translateX(120%);
  transition: transform 0.3s ease;
  opacity: 0.9;
}

.toast.show {
  transform: translateX(0);
}

.toast.hide {
  transform: translateX(120%);
}

.toast-icon {
  margin-right: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toast-message {
  font-size: 14px;
  line-height: 1.5;
}

.toast-success {
  background-color: #52c41a;
}

.toast-error {
  background-color: #ff4d4f;
}

.toast-warning {
  background-color: #faad14;
}

.toast-info {
  background-color: #1890ff;
}

/* 全局加载效果 */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.loading-overlay.active {
  opacity: 1;
  visibility: visible;
}

.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: rgba(255, 255, 255, 0.9);
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transform: translateY(20px);
  transition: transform 0.3s;
}

.loading-overlay.active .loading-container {
  transform: translateY(0);
}

.loading-spinner {
  position: relative;
  width: 60px;
  height: 60px;
  margin-bottom: 15px;
}

.loading-spinner::before,
.loading-spinner::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  animation-duration: 1.8s;
  animation-iteration-count: infinite;
  animation-timing-function: ease-in-out;
}

.loading-spinner::before {
  width: 100%;
  height: 100%;
  background: linear-gradient(to right, var(--primary-color), var(--primary-color-dark));
  animation-name: pulse;
  opacity: 0.6;
}

.loading-spinner::after {
  width: 80%;
  height: 80%;
  background-color: white;
  top: 10%;
  left: 10%;
  animation-name: pulse-inner;
}

.loading-text {
  font-size: 16px;
  color: var(--primary-color);
  font-weight: 500;
  text-align: center;
}

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

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

/* 主题颜色变量 */
:root {
  --primary-color: #157540;
  --primary-color-dark: #0d5e30;
  --primary-color-light: #e8f5e9;
  --text-color: #333;
  --text-color-light: #666;
  --text-color-lighter: #999;
  --border-color: #e0e0e0;
  --background-dark: #333;
  --background-light: #f5f5f5;
  --white: #fff;
  --success-color: #28a745;
  --error-color: #dc3545;
  --warning-color: #ffc107;
  --info-color: #0d6efd;
}

/* Header styles */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  background-color: var(--white);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  min-width: 1300px;
  transition: transform 0.3s ease;
  border-bottom: 1px solid #eaeaea;
}

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

.header-left .logo {
  height: 40px;
  margin-right: 20px;
}

.welcome-text {
  font-size: 14px;
  color: var(--text-color-light);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

/* 头部操作按钮样式 */
.header-action-btn {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 6px;
  transition: all 0.3s ease;
  position: relative;
  color: var(--text-color);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}

.header-action-btn:hover {
  background-color: rgba(0, 0, 0, 0.05);
  color: var(--primary-color);
}

.header-action-btn i {
  font-size: 18px;
  margin-right: 6px;
}

.header-action-btn span {
  margin-right: 4px;
}

.header-right a {
  color: var(--text-color);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s;
  display: flex;
  align-items: center;
  margin-left: 0; /* Remove existing margin */
  position: relative;
}

.header-right a:hover {
  color: var(--primary-color);
}

.header-right i {
  margin-right: 5px;
  font-size: 16px;
}

/* 徽标样式 */
.header-right .has-badge {
  padding-right: 8px;
}

.header-right .badge,
.header-action-btn .badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background-color: #f44336;
  color: white;
  font-size: 11px;
  border-radius: 10px;
  padding: 1px 6px;
  min-width: 16px;
  height: 16px;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.header-right .phone-number {
  font-weight: 500;
  color: var(--text-color); /* Override the previous style */
}

/* 小程序二维码悬停效果 */
.qrcode-hover {
  position: relative;
  cursor: pointer;
}

.qrcode-popup {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--white);
  border-radius: 8px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  padding: 15px;
  display: none;
  flex-direction: column;
  align-items: center;
  z-index: 100;
  margin-top: 10px;
  border: 1px solid #eaeaea;
  min-width: 150px;
}

.qrcode-popup::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 8px solid var(--white);
  z-index: 2;
}

.qrcode-popup::after {
  content: '';
  position: absolute;
  top: -9px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 9px solid transparent;
  border-right: 9px solid transparent;
  border-bottom: 9px solid #eaeaea;
  z-index: 1;
}

.qrcode-hover:hover .qrcode-popup {
  display: flex;
  animation: fadeIn 0.3s ease;
}

.qrcode-popup img {
  width: 120px;
  height: 120px;
  border-radius: 4px;
  margin-bottom: 10px;
}

.qrcode-popup p {
  font-size: 14px;
  color: var(--text-color);
  margin: 0;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* Footer styles */
.footer {
  background-color: var(--background-dark);
  color: var(--white);
  padding: 30px 20px;
  margin-top: auto;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  flex-wrap: wrap;
}

.footer-section {
  margin-bottom: 20px;
}

.footer-section h3 {
  font-size: 18px;
  margin-bottom: 15px;
  color: var(--white);
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 8px;
}

.footer-section ul li a {
  color: #ccc;
  text-decoration: none;
  font-size: 14px;
}

.footer-section ul li a:hover {
  color: var(--white);
}

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-contact .company-info h3 {
  color: var(--white);
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 10px 0;
}

.footer-contact .address {
  color: #ccc;
  font-size: 13px;
  line-height: 1.4;
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-bottom: 4px;
}

.footer-contact .address i {
  margin-top: 2px;
  color: #999;
}

.footer-contact .contact-details {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-contact .phone {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 0;
  color: var(--white);
}

.footer-contact .time {
  color: #ccc;
  margin-bottom: 0;
  font-size: 13px;
}

.footer-contact .email {
  color: #ccc;
  font-size: 13px;
}

.qr-code-section {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
}

.qr-code {
  text-align: center;
  margin: 0 20px;
}

.qr-code img {
  width: 100px;
  height: 100px;
  background-color: var(--white);
  padding: 5px;
}

.qr-code p {
  margin-top: 5px;
  font-size: 14px;
  color: #ccc;
}

.footer-bottom {
  border-top: 1px solid #444;
  padding-top: 20px;
  margin-top: 20px;
  text-align: center;
  color: #ccc;
  font-size: 14px;
}

.footer-logo {
  height: 40px;
  margin-bottom: 20px;
}

/* 滚动隐藏header的样式（如果需要） */
.header-hidden {
  transform: translateY(-100%);
}

/* 在不知道头部的具体样式情况下，我们添加这个规则来确保搜索框显示在头部上方 */
.header {
  z-index: 1000;
} 

/* 用户头像和下拉菜单样式 */
.user-profile-dropdown {
  position: relative;
  display: inline-block;
}

.user-profile {
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 20px;
  transition: background-color 0.3s;
}

.user-profile:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 8px;
  border: 1px solid #eaeaea;
}

.user-nickname {
  font-weight: 500;
  margin-right: 5px;
  color: var(--text-color);
}

.dropdown-icon {
  font-size: 16px;
  color: var(--text-color-light);
  transition: transform 0.3s;
}

.user-profile-dropdown:hover .dropdown-icon {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background-color: white;
  min-width: 180px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  padding: 8px 0;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
}

.user-profile-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(5px);
}

.dropdown-menu a {
  display: flex;
  align-items: center;
  padding: 10px 15px;
  color: var(--text-color);
  text-decoration: none;
  transition: background-color 0.2s;
  position: relative;
}

.dropdown-menu a:hover {
  background-color: #f5f5f5;
  color: var(--primary-color);
}

.dropdown-menu a i {
  margin-right: 10px;
  font-size: 18px;
  width: 20px;
  text-align: center;
}

.dropdown-menu .has-badge {
  padding-right: 40px;
}

.dropdown-menu .badge {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
}

.dropdown-menu .logout-link {
  border-top: 1px solid #eaeaea;
  margin-top: 5px;
  color: #ff6b6b;
}

.dropdown-menu .logout-link:hover {
  background-color: #fff8f8;
  color: #ff3333;
} 

/* 用户信息容器 */
.user-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

/* 代理商徽章样式 */
.agent-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background: linear-gradient(135deg, #ff6b35, #f7931e);
  color: white !important;
  font-size: 10px;
  font-weight: 600;
  border-radius: 12px;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
  position: relative;
  overflow: hidden;
  animation: badgeGlow 2s ease-in-out infinite alternate;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
}

.agent-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(255, 107, 53, 0.4);
  background: linear-gradient(135deg, #e55a2b, #e0851a);
}

.agent-badge:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
}

.agent-badge i {
  font-size: 10px;
  transition: transform 0.3s ease;
}

.agent-badge:hover i {
  transform: translateX(2px);
}

.agent-badge::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: badgeShine 3s ease-in-out infinite;
}

.agent-badge::after {
  content: '★';
  margin-right: 3px;
  font-size: 8px;
  animation: badgeStar 1.5s ease-in-out infinite;
}

@keyframes badgeGlow {
  0% {
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
  }
  100% {
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.5);
  }
}

@keyframes badgeShine {
  0% {
    left: -100%;
  }
  50% {
    left: 100%;
  }
  100% {
    left: 100%;
  }
}

@keyframes badgeStar {
  0%, 100% {
    transform: scale(1) rotate(0deg);
  }
  50% {
    transform: scale(1.2) rotate(180deg);
  }
}

/* 响应式调整 */
@media (max-width: 768px) {
  .agent-badge {
    font-size: 9px;
    padding: 1px 6px;
  }
  
  .agent-badge::after {
    font-size: 7px;
  }
  
  .footer-contact .company-info h3 {
    font-size: 15px;
  }
  
  .footer-contact .address {
    font-size: 12px;
  }
  
  .footer-contact .phone {
    font-size: 16px;
  }
  
  .footer-contact .time,
  .footer-contact .email {
    font-size: 12px;
  }
}


.send-code-btn {
  white-space: nowrap;
  padding: 12px 15px;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 5px;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.3s;
  height: 42px; /* 确保与输入框高度一致 */
}

.send-code-btn:hover {
  background-color: var(--primary-color-dark);
}

.send-code-btn:disabled {
  background-color: var(--text-color-lighter);
  cursor: not-allowed;
}

.stock-notice {
  display: flex;
  align-items: center;
  padding: 10px 15px;
  background-color: #fff8f8;
  border-radius: 6px;
  border: 1px solid #ffe0e0;
  margin-top: 15px;
}
.stock-notice-icon {
  color: #ff6b6b;
  font-size: 20px;
  margin-right: 10px;
}
.stock-notice-text {
  font-size: 14px;
  color: #555;
}
.dialog-padding-clear{
  padding: unset !important;
}
.protocol-container{
  padding: 120px;
}



/* 无记录提示样式 */
.no-record {
  text-align: center;
  padding: 60px 0;
}

.no-record-icon {
  font-size: 60px;
  color: #ccc;
  margin-bottom: 20px;
}

.no-record h3 {
  font-size: 18px;
  color: #666;
  margin-bottom: 10px;
}

.no-record p {
  font-size: 14px;
  color: #999;
  margin-bottom: 20px;
}

.no-record-btn-empty {
  background-color: #00823C;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 10px 20px;
  font-size: 15px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.3s;
}

.no-record-btn-empty:hover {
  background-color: #006e33;
  box-shadow: 0 4px 12px rgba(0, 130, 60, 0.2);
}