/* Seller Dashboard Styles */

/* Dashboard Container */
.dashboard-container {
  background: #f5f5f5;
  min-height: calc(100vh - 400px);
  padding: 40px 0;
}

.dashboard-layout {
  display: flex;
  gap: 30px;
  align-items: flex-start;
}

/* Sidebar */
.dashboard-sidebar {
  width: 260px;
  background: white;
  border-radius: 8px;
  padding: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 20px;
  flex-shrink: 0;
}

.sidebar-header {
  margin-bottom: 20px;
  padding: 20px;
  border-bottom: 1px solid #eee;
}

.sidebar-header h2 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #333;
}

.sidebar-header p {
  font-size: 13px;
  color: #666;
  line-height: 1.4;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
}

.sidebar-nav .nav-item {
  padding: 12px 16px;
  border-radius: 6px;
  color: #333;
  text-decoration: none;
  font-size: 14px;
  transition: all 0.2s;
  cursor: pointer;
}

.sidebar-nav .nav-item:hover {
  background: #f5f5f5;
  color: #2c3e50;
}

.sidebar-nav .nav-item.active {
  background: #2c3e50;
  color: white;
}

/* Dashboard Main Content */
.dashboard-main {
  flex: 1;
  background: white;
  border-radius: 8px;
  padding: 30px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.dashboard-header {
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid #eee;
}

.dashboard-header h1 {
  font-size: 24px;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
}

.hint-text {
  font-size: 14px;
  color: #999;
}

/* Content Area */
.dashboard-content {
  flex: 1;
  background: white;
  border-radius: 8px;
  padding: 30px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.content-section {
  display: none;
}

.content-section.active {
  display: block;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid #eee;
}

.section-header > div h1 {
  font-size: 24px;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
}

.section-header > div p {
  font-size: 14px;
  color: #666;
}

/* Tab Container */
.tab-container {
  display: flex;
  gap: 10px;
  margin-bottom: 30px;
  border-bottom: 2px solid #eee;
}

.tab-btn {
  padding: 12px 24px;
  border: none;
  background: transparent;
  color: #666;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s;
}

.tab-btn:hover {
  color: #2c3e50;
}

.tab-btn.active {
  color: #2c3e50;
  border-bottom-color: #2c3e50;
}

/* Tab Navigation */
.tab-nav {
  display: flex;
  gap: 10px;
  margin-bottom: 30px;
  border-bottom: 2px solid #eee;
  padding-bottom: 0;
}

/* Form Styles */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 30px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-group label {
  font-size: 14px;
  font-weight: 500;
  color: #333;
  margin-bottom: 8px;
}

.form-group label .required {
  color: #e74c3c;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  color: #333;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #2c3e50;
}

.form-group textarea {
  min-height: 100px;
  resize: vertical;
  font-family: inherit;
}

.form-hint {
  font-size: 12px;
  color: #999;
  margin-top: 4px;
}

/* File Upload */
.file-upload {
  display: flex;
  align-items: center;
  gap: 10px;
}

.file-upload input[type="file"] {
  display: none;
}

.file-upload-btn {
  padding: 10px 20px;
  background: #f5f5f5;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  color: #333;
  cursor: pointer;
  transition: all 0.2s;
}

.file-upload-btn:hover {
  background: #e8e8e8;
}

.file-name {
  font-size: 13px;
  color: #666;
}

/* Table Styles */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

.data-table thead {
  background: #f5f5f5;
}

.data-table th,
.data-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #eee;
  font-size: 14px;
}

.data-table th {
  font-weight: 600;
  color: #333;
}

.data-table td {
  color: #666;
}

.data-table tbody tr:hover {
  background: #fafafa;
}

/* Table Actions */
.table-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 20px;
}

/* Action Buttons */
.action-btns {
  display: flex;
  gap: 8px;
}

.btn-icon {
  padding: 6px 10px;
  border: 1px solid #ddd;
  background: white;
  border-radius: 4px;
  font-size: 13px;
  color: #666;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-icon:hover {
  background: #f5f5f5;
  color: #2c3e50;
}

.btn-icon.danger:hover {
  background: #fee;
  color: #e74c3c;
  border-color: #e74c3c;
}

/* Form Action Buttons */
.form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding-top: 20px;
  border-top: 1px solid #eee;
  margin-top: 30px;
}

.btn-secondary,
.btn-primary {
  padding: 12px 32px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary {
  background: #f5f5f5;
  border: 1px solid #ddd;
  color: #666;
}

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

.btn-primary {
  background: #2c3e50;
  border: 1px solid #2c3e50;
  color: white;
}

.btn-primary:hover {
  background: #1a252f;
}

/* Responsive */
@media (max-width: 968px) {
  .dashboard-layout {
    flex-direction: column;
  }

  .dashboard-sidebar {
    width: 100%;
    position: static;
  }

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

/* 添加商品管理页面表格样式 */
/* Products Table */
.products-table-container {
  overflow-x: auto;
  margin-top: 20px;
}

.products-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
}

.products-table thead {
  background: #f8f9fa;
  border-bottom: 2px solid #e9ecef;
}

.products-table th {
  padding: 16px 12px;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  color: #495057;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.products-table tbody tr {
  border-bottom: 1px solid #e9ecef;
  transition: background-color 0.2s;
}

.products-table tbody tr:hover {
  background-color: #f8f9fa;
}

.products-table td {
  padding: 16px 12px;
  font-size: 14px;
  color: #333;
  vertical-align: middle;
}

/* Product Thumbnail */
.product-thumbnail {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}

/* Status Badges */
.status-badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-badge.status-active {
  background-color: #d4edda;
  color: #155724;
}

.status-badge.status-pending {
  background-color: #fff3cd;
  color: #856404;
}

.status-badge.status-out_of_stock {
  background-color: #f8d7da;
  color: #721c24;
}

/* Actions Cell */
.actions-cell {
  display: flex;
  gap: 8px;
}

.btn-action {
  padding: 6px 12px;
  border: 1px solid #dee2e6;
  background: white;
  border-radius: 4px;
  font-size: 13px;
  color: #495057;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-action:hover {
  background: #e9ecef;
  border-color: #adb5bd;
  color: #212529;
}

.btn-action.btn-delete:hover {
  background: #f8d7da;
  border-color: #f5c6cb;
  color: #721c24;
}

/* Empty State */
.empty-state {
  padding: 60px 20px;
  text-align: center;
  color: #6c757d;
  font-size: 14px;
}

.loading-text {
  padding: 60px 20px;
  text-align: center;
  color: #6c757d;
  font-size: 14px;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-content {
  background: white;
  border-radius: 8px;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

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

.modal-header h2 {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  margin: 0;
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: #999;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s;
}

.modal-close:hover {
  background: #f8f9fa;
  color: #333;
}

.modal-body {
  padding: 20px;
}

.modal-footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding-top: 20px;
  margin-top: 20px;
  border-top: 1px solid #e9ecef;
}

/* 添加页面标题布局样式 */
/* Page Header Layout - 与商品管理页面一致的标题布局 */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid #eee;
}

.page-header-left h1 {
  font-size: 24px;
  font-weight: 600;
  color: #333;
  margin: 0 0 8px 0;
}

.page-subtitle {
  font-size: 14px;
  color: #666;
  margin: 0;
}

.page-header-right {
  display: flex;
  gap: 10px;
}

/* Toolbar */
.toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 20px;
}

/* 添加图片上传相关样式 */

/* Image Upload Section */
.image-upload-section {
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 20px;
  background: #fafafa;
}

/* Upload Tabs */
.upload-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  border-bottom: 2px solid #e9ecef;
}

.upload-tabs .tab-btn {
  padding: 10px 20px;
  border: none;
  background: transparent;
  color: #666;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s;
}

.upload-tabs .tab-btn:hover {
  color: #2c3e50;
}

.upload-tabs .tab-btn.active {
  color: #2c3e50;
  border-bottom-color: #2c3e50;
  font-weight: 600;
}

/* Upload Tab Content */
.upload-tab-content {
  display: none;
}

.upload-tab-content.active {
  display: block;
}

/* Image Upload Box */
.image-upload-box {
  position: relative;
  width: 100%;
  min-height: 200px;
}

.upload-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  border: 2px dashed #dee2e6;
  border-radius: 8px;
  background: white;
  cursor: pointer;
  transition: all 0.3s;
}

.upload-placeholder:hover {
  border-color: #2c3e50;
  background: #f8f9fa;
}

.upload-placeholder svg {
  color: #adb5bd;
  margin-bottom: 12px;
}

.upload-placeholder p {
  font-size: 14px;
  color: #495057;
  margin: 0 0 8px 0;
  font-weight: 500;
}

.upload-placeholder span {
  font-size: 12px;
  color: #6c757d;
}

/* Image Preview */
.image-preview {
  position: relative;
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  background: #f8f9fa;
}

.image-preview img {
  width: 100%;
  height: auto;
  max-height: 300px;
  object-fit: contain;
  display: block;
}

.remove-image-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  border: none;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.remove-image-btn:hover {
  background: rgba(220, 53, 69, 0.9);
  transform: scale(1.1);
}

/* URL Input Tab */
#urlUploadTab {
  display: flex;
  gap: 10px;
  align-items: flex-end;
}

#urlUploadTab input {
  flex: 1;
}

#urlUploadTab .btn-secondary {
  white-space: nowrap;
}

/* Image Gallery Upload */
.image-gallery-upload {
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 20px;
  background: #fafafa;
}

.image-gallery-upload .btn-secondary {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 15px;
}

.image-gallery-upload .btn-secondary svg {
  flex-shrink: 0;
}

/* Gallery Preview Grid */
.gallery-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 15px;
  margin-top: 15px;
}

.gallery-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  background: white;
  border: 1px solid #e9ecef;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.remove-gallery-btn {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  border: none;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.remove-gallery-btn:hover {
  background: rgba(220, 53, 69, 0.9);
  transform: scale(1.1);
}

/* Form Control for URL input */
.form-control {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  color: #333;
  transition: border-color 0.2s;
}

.form-control:focus {
  outline: none;
  border-color: #2c3e50;
}

/* Responsive adjustments for image upload */
@media (max-width: 768px) {
  .gallery-preview-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
  }

  #urlUploadTab {
    flex-direction: column;
  }

  #urlUploadTab .btn-secondary {
    width: 100%;
  }
}

/* 卖家订单卡片 */
.seller-order-card {
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  background: #fff;
}
.seller-order-card .order-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.seller-order-card .order-no {
  font-weight: 600;
  color: #333;
}
.seller-order-card .order-date {
  color: #999;
  font-size: 13px;
}
.seller-order-card .order-status {
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
}
.seller-order-card .order-status.status-pending { background: #fff3e0; color: #e65100; }
.seller-order-card .order-status.status-paid { background: #e3f2fd; color: #1976d2; }
.seller-order-card .order-status.status-shipped { background: #e8f5e9; color: #388e3c; }
.seller-order-card .order-address {
  font-size: 13px;
  color: #666;
  margin-bottom: 12px;
}
.seller-order-card .order-items {
  margin-bottom: 12px;
}
.seller-order-card .order-item-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid #f5f5f5;
}
.seller-order-card .order-item-row img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 4px;
  background: #f5f5f5;
}
.seller-order-card .order-item-info {
  flex: 1;
  min-width: 0;
}
.seller-order-card .order-item-meta {
  font-size: 12px;
  color: #999;
}
.seller-order-card .order-item-sub {
  font-weight: 600;
}
.seller-order-card .order-shipping {
  font-size: 13px;
  color: #1976d2;
  margin-bottom: 8px;
}
.seller-order-card .order-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid #eee;
}
.seller-order-card .btn-ship {
  padding: 8px 16px;
  background: #2c3e50;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
}
.seller-order-card .btn-ship:hover {
  background: #34495e;
}
