* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: #f0f2f5;
  color: #333;
}

/* 模态框 */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-content {
  background: #fff;
  border-radius: 8px;
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  padding: 16px 24px;
  border-bottom: 1px solid #e8e8e8;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  margin: 0;
  font-size: 18px;
}

.modal-close {
  font-size: 28px;
  cursor: pointer;
  color: #999;
  transition: color 0.3s;
}

.modal-close:hover {
  color: #333;
}

.modal-body {
  padding: 24px;
}

/* 表单样式 */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #333;
}

.form-group label::after {
  content: ' *';
  color: #ff4d4f;
  display: none;
}

.form-group label[for]::after {
  display: inline;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  font-size: 14px;
  transition: border-color 0.3s;
  background: #fff;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #1890ff;
  box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.1);
}

.form-group textarea {
  min-height: 80px;
  resize: vertical;
  font-family: inherit;
}

.form-group small {
  display: block;
  margin-top: 4px;
  color: #8c8c8c;
  font-size: 12px;
}

.form-group input[readonly] {
  background: #f5f5f5;
  color: #8c8c8c;
  cursor: not-allowed;
}

/* 多选下拉框样式 */
.form-group select[multiple] {
  min-height: 120px;
  padding: 8px;
}

.form-group select[multiple] option {
  padding: 4px 8px;
  margin: 2px 0;
}

.form-group select[multiple] option:checked {
  background: #1890ff;
  color: #fff;
}

/* 模态框宽度扩展 */
.modal-content.coupon-modal {
  max-width: 700px;
}

.form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
}

#app {
  display: flex;
  min-height: 100vh;
}

/* 侧边栏 */
.sidebar {
  width: 240px;
  background: #001529;
  color: #fff;
  position: fixed;
  height: 100vh;
  left: 0;
  top: 0;
}

.logo {
  padding: 20px;
  background: #002140;
  text-align: center;
}

.logo h2 {
  font-size: 18px;
  margin: 0;
}

.menu {
  padding: 20px 0;
}

.menu-item {
  padding: 12px 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.3s;
}

.menu-item:hover {
  background: #1890ff;
}

.menu-item.active {
  background: #1890ff;
}

.menu-item span:first-child {
  font-size: 20px;
}

/* 主内容区 */
.main-content {
  margin-left: 240px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.header {
  background: #fff;
  padding: 16px 24px;
  box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-title {
  font-size: 20px;
  font-weight: bold;
}

.header-actions {
  display: flex;
  align-items: center;
}

.user-info {
  position: relative;
}

.user-dropdown {
  position: relative;
}

.user-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 14px;
  color: #333;
  transition: all 0.3s;
  background: #fff;
}

.user-btn:hover {
  border-color: #1890ff;
  color: #1890ff;
}

.user-avatar {
  font-size: 16px;
}

.user-name {
  font-weight: 500;
  max-width: 120px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dropdown-arrow {
  font-size: 10px;
  transition: transform 0.3s;
}

.user-dropdown:hover .dropdown-arrow {
  transform: rotate(180deg);
}

.user-dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  min-width: 200px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
  border: 1px solid #f0f0f0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s;
  z-index: 1001;
  overflow: hidden;
}

.user-dropdown:hover .user-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.user-profile {
  display: flex;
  align-items: center;
  padding: 16px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.profile-avatar {
  font-size: 24px;
  margin-right: 12px;
}

.profile-info {
  flex: 1;
}

.profile-name {
  font-weight: 600;
  font-size: 16px;
}

.profile-role {
  font-size: 12px;
  opacity: 0.9;
  margin-top: 2px;
}

.dropdown-divider {
  height: 1px;
  background: #f0f0f0;
  margin: 4px 0;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  color: #333;
  text-decoration: none;
  font-size: 14px;
  transition: background 0.3s;
}

.dropdown-item:hover {
  background: #f5f5f5;
  color: #1890ff;
}

.dropdown-item span {
  width: 16px;
  text-align: center;
}

.logout-item {
  color: #ff4d4f;
}

.logout-item:hover {
  background: #fff2f0;
  color: #ff4d4f;
}

/* 认证保护样式 */
.auth-protected {
  display: none;
}

.auth-required {
  text-align: center;
  padding: 60px 20px;
  max-width: 500px;
  margin: 0 auto;
}

.auth-required-icon {
  font-size: 64px;
  margin-bottom: 20px;
  color: #667eea;
}

.auth-required h3 {
  font-size: 24px;
  margin-bottom: 10px;
  color: #333;
}

.auth-required p {
  color: #666;
  margin-bottom: 30px;
  line-height: 1.6;
}

.auth-required .btn {
  display: inline-block;
  padding: 12px 32px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
  transition: transform 0.3s, box-shadow 0.3s;
}

.auth-required .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.content {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
}

/* 数据卡片 */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-bottom: 24px;
}

.stat-card {
  background: #fff;
  padding: 24px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
}

.stat-icon {
  font-size: 48px;
}

.stat-info {
  flex: 1;
}

.stat-value {
  font-size: 32px;
  font-weight: bold;
  color: #1890ff;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 14px;
  color: #666;
}

/* 页面头部 */
.page-header {
  background: #fff;
  padding: 16px 24px;
  border-radius: 8px;
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.page-header h3 {
  font-size: 18px;
  margin: 0;
}

/* 表格 */
.table-container {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid #f0f0f0;
}

.data-table th {
  background: #fafafa;
  font-weight: bold;
  color: #333;
}

.data-table tbody tr:hover {
  background: #fafafa;
}

/* 按钮 */
.btn {
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s;
}

.btn-primary {
  background: #1890ff;
  color: #fff;
}

.btn-primary:hover {
  background: #40a9ff;
}

.btn-danger {
  background: #ff4d4f;
  color: #fff;
}

.btn-danger:hover {
  background: #ff7875;
}

.btn-sm {
  padding: 4px 12px;
  font-size: 12px;
}

/* 状态标签 */
.status-tag,
.tag {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  display: inline-block;
}

.status-success,
.tag-success {
  background: #f6ffed;
  color: #52c41a;
  border: 1px solid #b7eb8f;
}

.status-warning,
.tag-warning {
  background: #fffbe6;
  color: #faad14;
  border: 1px solid #ffe58f;
}

.status-error,
.tag-danger {
  background: #fff1f0;
  color: #f5222d;
  border: 1px solid #ffa39e;
}

.tag-gray {
  background: #f5f5f5;
  color: #8c8c8c;
  border: 1px solid #d9d9d9;
}

/* 用户详情页样式 */
.user-detail-section {
  background: #fff;
  padding: 24px;
  margin-bottom: 16px;
  border-radius: 4px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.user-detail-section h4 {
  margin: 0 0 20px 0;
  font-size: 16px;
  font-weight: 500;
  color: #262626;
  border-bottom: 1px solid #f0f0f0;
  padding-bottom: 12px;
}

.user-detail-section h4 button {
  margin-right: 12px;
  cursor: pointer;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.info-item label {
  font-size: 13px;
  color: #8c8c8c;
  font-weight: 500;
}

.info-item span {
  font-size: 14px;
  color: #262626;
  word-break: break-all;
}

.points-balance {
  font-size: 20px !important;
  font-weight: bold;
  color: #1890ff;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.stat-item {
  background: #fafafa;
  border-radius: 4px;
  padding: 20px;
  text-align: center;
  border: 1px solid #f0f0f0;
}

.stat-item.income {
  background: #f6ffed;
  border-color: #b7eb8f;
}

.stat-item.income span {
  color: #52c41a;
}

.stat-item.expense {
  background: #fff2f0;
  border-color: #ffccc7;
}

.stat-item.expense span {
  color: #ff4d4f;
}

.stat-item label {
  display: block;
  font-size: 13px;
  color: #8c8c8c;
  margin-bottom: 8px;
}

.stat-item span {
  display: block;
  font-size: 24px;
  font-weight: bold;
  color: #262626;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
  padding: 16px;
  background: #fafafa;
  border-radius: 4px;
}

.filter-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-item label {
  font-size: 13px;
  color: #595959;
}

.filter-item input[type="date"],
.filter-item select {
  padding: 6px 12px;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  font-size: 13px;
  outline: none;
}

.filter-item input[type="date"]:focus,
.filter-item select:focus {
  border-color: #1890ff;
  box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.1);
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
  padding: 16px;
}

.pagination-info {
  color: #8c8c8c;
  font-size: 13px;
  margin-right: 16px;
}

.pagination-ellipsis {
  color: #8c8c8c;
  font-size: 13px;
  padding: 0 4px;
}

/* 订单详情页样式 */
.order-detail-section {
  background: #fff;
  padding: 24px;
  margin-bottom: 16px;
  border-radius: 4px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.order-detail-section h4 {
  margin: 0 0 20px 0;
  font-size: 16px;
  font-weight: 500;
  color: #262626;
  border-bottom: 1px solid #f0f0f0;
  padding-bottom: 12px;
}

.order-detail-section h4 button {
  margin-right: 12px;
  cursor: pointer;
}

.product-info,
.address-info,
.shipment-info {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}

.ship-form {
  background: #fafafa;
  padding: 20px;
  border-radius: 4px;
}

.ship-form .form-group {
  margin-bottom: 16px;
}

.ship-form .form-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #595959;
}

.ship-form select,
.ship-form input[type="text"] {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  font-size: 14px;
  outline: none;
}

.ship-form select:focus,
.ship-form input[type="text"]:focus {
  border-color: #1890ff;
  box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.1);
}

.action-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-success {
  background: #52c41a;
  border-color: #52c41a;
  color: #fff;
}

.btn-success:hover {
  background: #73d13d;
  border-color: #73d13d;
  color: #fff;
}

.btn-info {
  background: #13c2c2;
  color: #fff;
}

.btn-info:hover {
  background: #36cfc9;
}

.btn-info {
  background: #1890ff;
  border-color: #1890ff;
  color: #fff;
}

.btn-info:hover {
  background: #40a9ff;
  border-color: #40a9ff;
  color: #fff;
}

/* 订单管理页筛选栏 */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
}

.filter-bar select,
.filter-bar input[type="text"] {
  padding: 6px 12px;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  font-size: 13px;
  outline: none;
}

.filter-bar select:focus,
.filter-bar input[type="text"]:focus {
  border-color: #1890ff;
  box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.1);
}

.filter-bar input[type="text"] {
  width: 200px;
}

/* 响应式 */
@media (max-width: 768px) {
  .sidebar {
    width: 200px;
  }

  .main-content {
    margin-left: 200px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .info-grid {
    grid-template-columns: 1fr;
  }

  .stats-row {
    grid-template-columns: 1fr;
  }

  .filter-bar {
    flex-direction: column;
  }

  .filter-item {
    width: 100%;
    justify-content: flex-start;
  }
}

/* 物流查询结果样式 */
.logistics-result {
  padding: 16px;
}

.logistics-header {
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e8e8e8;
}

.logistics-state {
  font-size: 16px;
  color: #1890ff;
}

.logistics-state.signed {
  color: #52c41a;
  font-weight: bold;
}

.logistics-tracks {
  max-height: 400px;
  overflow-y: auto;
}

.track-list {
  list-style: none;
  padding: 0;
  margin: 0;
  position: relative;
}

.track-list::before {
  content: '';
  position: absolute;
  left: 80px;
  top: 20px;
  bottom: 20px;
  width: 2px;
  background: #e8e8e8;
}

.track-list li {
  position: relative;
  padding: 12px 12px 12px 100px;
  border-left: 2px solid transparent;
}

.track-list li.current {
  border-left-color: #52c41a;
}

.track-list li.current::before {
  content: '';
  position: absolute;
  left: 76px;
  top: 16px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #52c41a;
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px #52c41a;
}

.track-list li::before {
  content: '';
  position: absolute;
  left: 78px;
  top: 18px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #d9d9d9;
  border: 2px solid #fff;
}

.track-time {
  position: absolute;
  left: 12px;
  top: 12px;
  width: 60px;
  font-size: 12px;
  color: #8c8c8c;
  text-align: right;
  line-height: 1.4;
}

.track-content {
  font-size: 14px;
  color: #262626;
  line-height: 1.6;
}

.track-list li.current .track-content {
  color: #52c41a;
  font-weight: 500;
}

/* 入驻咨询列表样式 */
.consultation-list {
  flex: 1;
  padding: 0;
}

.consultation-item {
  background: white;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.consultation-icon {
  font-size: 48px;
  width: 80px;
  height: 80px;
  background: #f8f9fa;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.consultation-info {
  flex: 1;
}

.consultation-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.consultation-name {
  font-size: 16px;
  font-weight: 600;
  color: #2c3e50;
}

.consultation-status {
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.consultation-status.pending {
  background: #fff3cd;
  color: #856404;
}

.consultation-status.processed {
  background: #d4edda;
  color: #155724;
}

.consultation-detail {
  font-size: 14px;
  color: #666;
  margin-bottom: 6px;
}

.consultation-time {
  font-size: 12px;
  color: #999;
}

.consultation-actions {
  display: flex;
  gap: 8px;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 13px;
}

.btn-success {
  background: #27ae60;
  color: white;
}

.btn-success:hover {
  background: #219150;
}

.empty-state {
  text-align: center;
  padding: 80px 20px;
}

.empty-icon {
  font-size: 64px;
  margin-bottom: 16px;
}

.empty-text {
  font-size: 16px;
  color: #999;
}

/* 加载动画 */
.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #1890ff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* 进件商户弹窗样式 */
#applyingMerchantsModal .modal-content {
  max-height: 85vh;
}

#applyingMerchantsModal .modal-body {
  padding: 0;
}

.applying-merchants-container {
  padding: 20px;
}

.applying-merchants-container .filter-bar {
  display: flex;
  align-items: center;
  padding-bottom: 15px;
  border-bottom: 1px solid #e8e8e8;
}

.applying-merchants-container .data-table {
  margin-top: 0;
}

.applying-merchants-container .data-table th {
  background: #fafafa;
  font-weight: 600;
  color: #333;
  padding: 12px 16px;
  white-space: nowrap;
}

.applying-merchants-container .data-table td {
  padding: 12px 16px;
  vertical-align: middle;
}

.applying-merchants-container .status-tag {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}


