/**
 * ASIN采集器 UI - 现代简洁风格
 * 宽度: 620px | 设计: 扁平化 | 动效: 流畅
 */

/* ========== 基础 ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #667eea;
  --primary-light: #818cf8;
  --secondary: #764ba2;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --bg: #ffffff;
  --bg-light: #f8fafc;
  --bg-gray: #f1f5f9;
  --border: #e2e8f0;
  --text: #1e293b;
  --text-light: #64748b;
  --text-muted: #94a3b8;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

body {
  width: 580px;
  max-height: 600px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text);
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  overflow: hidden;
}

.container {
  background: var(--bg);
  max-height: 600px;
  overflow-y: auto;
  overflow-x: hidden;
}

.container::-webkit-scrollbar {
  width: 8px;
}

.container::-webkit-scrollbar-track {
  background: var(--bg-gray);
}

.container::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--primary), var(--secondary));
  border-radius: 4px;
}

/* ========== 更新横幅 ========== */
.update-banner {
  padding: 12px 20px;
  background: linear-gradient(135deg, var(--success), #059669);
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  animation: slideDown 0.3s ease;
}

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

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.update-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.update-icon {
  font-size: 20px;
}

.update-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 12px;
}

.update-text strong {
  font-weight: 700;
}

.update-btns {
  display: flex;
  gap: 8px;
}

.btn-update {
  padding: 6px 16px;
  background: white;
  color: var(--success);
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-update:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-close {
  width: 28px;
  height: 28px;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.btn-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

/* ========== 头部 ========== */
.header {
  padding: 20px 24px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.header::before {
  content: '';
  position: absolute;
  top: -100%;
  right: -50%;
  width: 300%;
  height: 300%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 60%);
  animation: float 8s ease-in-out infinite;
}

@keyframes float {

  0%,
  100% {
    transform: translate(0, 0) rotate(0deg);
  }

  50% {
    transform: translate(-30px, -30px) rotate(180deg);
  }
}

.header-left {
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
  z-index: 1;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  z-index: 1;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.user-icon {
  font-size: 14px;
}

.username {
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-dashboard {
  width: 32px;
  height: 32px;
  padding: 0;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  backdrop-filter: blur(10px);
}

.btn-dashboard:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
}

.btn-dashboard:active {
  transform: scale(0.95);
}

.btn-logout {
  width: 32px;
  height: 32px;
  padding: 0;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  backdrop-filter: blur(10px);
}

.btn-logout:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
}

.btn-logout:active {
  transform: scale(0.95);
}

.logo {
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.header-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.subtitle {
  font-size: 11px;
  opacity: 0.95;
  font-weight: 500;
}

.version-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  letter-spacing: 0.5px;
  position: relative;
  z-index: 1;
  animation: versionPulse 3s ease-in-out infinite;
}

@keyframes versionPulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4);
  }
  50% {
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0);
  }
}

/* ========== 主操作区 ========== */
.main-section {
  padding: 20px 24px;
  background: var(--bg);
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 20px;
  border-bottom: 1px solid var(--border);
}

/* ===== 紧凑版主操作区 ===== */
.main-section-compact {
  padding: 12px 20px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.status-compact {
  margin-bottom: 12px;
}

.status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.status-badge-small {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--bg-light);
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
}

.page-badge-small {
  font-size: 11px;
  color: var(--text-light);
  padding: 4px 10px;
  background: var(--bg-light);
  border-radius: 12px;
}

.stats-row {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 8px;
  padding: 10px;
  background: var(--bg-light);
  border-radius: 8px;
}

.stat-item-small {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 1;
}

.stat-label-small {
  font-size: 10px;
  color: var(--text-light);
  font-weight: 500;
}

.stat-value-small {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.stat-divider {
  width: 1px;
  height: 30px;
  background: var(--border);
}

.stat-highlight-small .stat-value-small {
  color: var(--primary);
}

.actions-compact {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-action-compact {
  flex: 1;
  min-width: 100px;
  padding: 8px 12px;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.2s;
  box-shadow: var(--shadow-sm);
}

.btn-action-compact:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.btn-action-compact:active {
  transform: translateY(0);
}

.btn-icon-small {
  font-size: 14px;
}

.btn-primary-compact {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: white;
}

.btn-warning-compact {
  background: linear-gradient(135deg, var(--warning) 0%, #fbbf24 100%);
  color: white;
}

.btn-success-compact {
  background: linear-gradient(135deg, var(--success) 0%, #34d399 100%);
  color: white;
}

.btn-danger-compact {
  background: linear-gradient(135deg, var(--danger) 0%, #f87171 100%);
  color: white;
}

.btn-reset-compact {
  background: var(--bg-gray);
  color: var(--text);
}

/* 操作面板 */
.actions-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-main {
  width: 100%;
  padding: 16px 20px;
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.btn-main::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn-main:hover::before {
  width: 300px;
  height: 300px;
}

.btn-main:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

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

.btn-main:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-icon {
  font-size: 18px;
  position: relative;
  z-index: 1;
}

.btn-text {
  position: relative;
  z-index: 1;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
}

.btn-warning {
  background: linear-gradient(135deg, var(--warning), #d97706);
  color: white;
}

.btn-success {
  background: linear-gradient(135deg, var(--success), #059669);
  color: white;
}

.btn-danger {
  background: linear-gradient(135deg, var(--danger), #dc2626);
  color: white;
}

.btn-group {
  display: flex;
  gap: 8px;
}

.btn-secondary {
  flex: 1;
  padding: 12px;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.btn-reset {
  background: var(--bg-gray);
  color: var(--text);
}

/* 状态面板 */
.status-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.status-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.status-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--bg-light);
  border-radius: 20px;
  border: 2px solid var(--border);
}

.status-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.status-dot.idle {
  background: var(--text-muted);
  box-shadow: none;
}

.status-dot.scraping {
  background: var(--warning);
  animation: pulse 1.5s ease-in-out infinite;
}

.status-dot.uploading {
  background: #06b6d4;
  animation: pulse 1.5s ease-in-out infinite;
}

.status-dot.completed {
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.3);
}

.status-dot.error {
  background: var(--danger);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.3);
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.7;
    transform: scale(1.3);
  }
}

.status-text {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.page-badge {
  padding: 6px 14px;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
  border: 1px solid rgba(102, 126, 234, 0.3);
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 统计网格 */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.stat-card {
  padding: 14px 12px;
  background: var(--bg-light);
  border: 2px solid var(--border);
  border-radius: 12px;
  text-align: center;
  transition: all 0.25s;
}

.stat-card:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.stat-card.stat-highlight {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.08), rgba(118, 75, 162, 0.08));
  border-color: var(--primary);
}

.stat-label {
  display: block;
  font-size: 10px;
  color: var(--text-light);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.stat-value {
  display: block;
  font-size: 26px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

/* 进度条 */
.progress-wrapper {
  height: 8px;
  background: var(--bg-gray);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  width: 0%;
  transition: width 0.4s ease;
  box-shadow: 0 0 10px rgba(102, 126, 234, 0.5);
  position: relative;
}

.progress-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(100%);
  }
}

/* ========== 页面详情 ========== */
.page-details {
  padding: 0 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--bg);
}

.detail-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg-light);
  border-radius: 8px;
  border-left: 3px solid var(--primary);
  transition: all 0.2s;
}

.detail-row:hover {
  background: var(--bg-gray);
  transform: translateX(3px);
}

.detail-icon {
  font-size: 16px;
  flex-shrink: 0;
}

.detail-text {
  flex: 1;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ========== 消息 ========== */
.message-error,
.message-success {
  margin: 0 24px 16px;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  animation: slideIn 0.3s ease;
}

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

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.message-error {
  background: #fef2f2;
  color: #991b1b;
  border: 2px solid #fecaca;
}

.message-success {
  background: #f0fdf4;
  color: #166534;
  border: 2px solid #bbf7d0;
}

/* ========== 折叠面板 ========== */
.panel {
  border-bottom: 1px solid var(--border);
}

.panel-header {
  padding: 16px 24px;
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg);
  transition: all 0.2s;
}

.panel-header:hover {
  background: var(--bg-light);
}

.panel[open] .panel-header {
  background: var(--bg-light);
  border-bottom: 1px solid var(--border);
  color: var(--primary);
}

.panel-icon {
  font-size: 18px;
}

.panel-title {
  flex: 1;
  font-size: 14px;
  font-weight: 700;
}

.panel-count {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
}

.panel-arrow {
  font-size: 20px;
  color: var(--text-muted);
  transition: transform 0.2s;
  font-weight: 300;
}

.panel[open] .panel-arrow {
  transform: rotate(90deg);
  color: var(--primary);
}

.link-update {
  padding: 4px 10px;
  background: rgba(102, 126, 234, 0.1);
  color: var(--primary);
  text-decoration: none;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 700;
  transition: all 0.2s;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.link-update:hover {
  background: var(--primary);
  color: white;
  transform: scale(1.05);
}

.panel-body {
  padding: 20px 24px;
  background: var(--bg-light);
}

/* ========== 表单 ========== */
.field {
  margin-bottom: 16px;
}

.field label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.label-hint {
  font-size: 10px;
  font-weight: 500;
  color: var(--text-light);
  text-transform: none;
}

.input,
.select {
  width: 100%;
  padding: 11px 14px;
  border: 2px solid var(--border);
  border-radius: 10px;
  font-size: 13px;
  background: var(--bg);
  color: var(--text);
  transition: all 0.2s;
}

.input:focus,
.select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

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

.select {
  cursor: pointer;
}

/* 模式选择 */
.mode-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mode-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.25s;
}

.mode-card:hover {
  border-color: var(--primary);
  background: rgba(102, 126, 234, 0.02);
  transform: translateX(3px);
  box-shadow: var(--shadow-sm);
}

.mode-card input[type='radio'] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--primary);
  flex-shrink: 0;
}

.mode-info {
  flex: 1;
}

.mode-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 3px;
}

.mode-desc {
  font-size: 11px;
  color: var(--text-light);
  line-height: 1.3;
}

.mode-badge {
  font-size: 20px;
  opacity: 0.6;
  transition: all 0.2s;
}

.mode-card:hover .mode-badge {
  opacity: 1;
  transform: scale(1.2);
}

.mode-featured {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
  border-color: var(--primary);
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--bg);
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 14px;
  transition: all 0.2s;
}

.checkbox-row:hover {
  background: var(--bg-gray);
}

.checkbox-row input {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--primary);
}

.btn-save {
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.25s;
  box-shadow: var(--shadow);
  margin-top: 4px;
}

.btn-save:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* ========== 站点网格 ========== */
.sites-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  max-height: 280px;
  overflow-y: auto;
  padding: 2px;
}

.sites-grid::-webkit-scrollbar {
  width: 6px;
}

.sites-grid::-webkit-scrollbar-track {
  background: var(--bg-gray);
}

.sites-grid::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--primary), var(--secondary));
  border-radius: 3px;
}

.site-btn {
  padding: 12px 8px;
  border: 2px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  cursor: pointer;
  transition: all 0.25s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  box-shadow: var(--shadow-sm);
}

.site-btn:hover {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  border-color: var(--primary);
  transform: translateY(-3px) scale(1.03);
  box-shadow: var(--shadow-lg);
}

.site-btn-flag {
  font-size: 28px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.site-btn-code {
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.8px;
}

.site-btn-name {
  font-size: 10px;
  color: var(--text-light);
  line-height: 1.2;
  text-align: center;
}

.site-btn:hover .site-btn-name {
  color: white;
}

.site-btn.active {
  background: linear-gradient(135deg, var(--success), #059669);
  color: white;
  border-color: var(--success);
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4);
  animation: glow 2s ease-in-out infinite;
}

@keyframes glow {

  0%,
  100% {
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4);
  }

  50% {
    box-shadow: 0 6px 24px rgba(16, 185, 129, 0.6);
  }
}

.site-btn.active .site-btn-code,
.site-btn.active .site-btn-name {
  color: white;
}

/* ========== 商家统计 ========== */
.query-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.query-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.query-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.query-col label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.query-col input {
  padding: 10px 12px;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  text-align: center;
  font-weight: 700;
  color: var(--primary);
  background: var(--bg);
  transition: all 0.2s;
}

.query-col input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn-query {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.25s;
  box-shadow: var(--shadow);
}

.btn-query:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 40px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
}

.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* 结果头部 */
.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
}

.results-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.results-count {
  padding: 5px 12px;
  background: rgba(102, 126, 234, 0.1);
  color: var(--primary);
  border-radius: 16px;
  font-size: 12px;
  font-weight: 700;
}

/* 批量操作栏 */
.batch-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: 10px;
  margin-bottom: 14px;
}

.batch-select {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
}

.batch-select input {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--primary);
}

.batch-btns {
  display: flex;
  gap: 6px;
}

.btn-xs {
  padding: 7px 12px;
  background: var(--bg);
  color: var(--primary);
  border: 1px solid var(--primary);
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-xs:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.btn-xs:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

/* 批量进度 */
.batch-progress {
  padding: 12px 14px;
  background: #eff6ff;
  border: 2px solid #bfdbfe;
  border-radius: 10px;
  margin-bottom: 14px;
}

.progress-info {
  font-size: 12px;
  font-weight: 700;
  color: #1e40af;
  margin-bottom: 8px;
  text-align: center;
}

.progress-track {
  height: 8px;
  background: var(--bg-gray);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  width: 0%;
  transition: width 0.3s;
  box-shadow: 0 0 10px rgba(102, 126, 234, 0.6);
}

/* 表格 */
.table-box {
  max-height: 350px;
  overflow-y: auto;
  border: 2px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  box-shadow: var(--shadow-sm);
}

.table-box::-webkit-scrollbar {
  width: 8px;
}

.table-box::-webkit-scrollbar-track {
  background: var(--bg-gray);
}

.table-box::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--primary), var(--secondary));
  border-radius: 4px;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.table thead {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  position: sticky;
  top: 0;
  z-index: 10;
}

.table th {
  padding: 12px 10px;
  text-align: left;
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--border);
}

.table tbody tr {
  transition: all 0.2s;
}

.table tbody tr:hover {
  background: var(--bg-light);
}

.table tbody tr:nth-child(even) {
  background: rgba(248, 250, 252, 0.5);
}

.table tbody tr:nth-child(even):hover {
  background: var(--bg-light);
}

.w-40 {
  width: 40px;
  text-align: center;
}

.w-60 {
  width: 60px;
  text-align: center;
}

.w-80 {
  width: 80px;
  text-align: center;
}

.w-120 {
  width: 120px;
}

.w-auto {
  width: auto;
}

.table input[type='checkbox'] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--primary);
}

.site-badge {
  display: inline-block;
  padding: 5px 10px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  box-shadow: 0 2px 6px rgba(102, 126, 234, 0.4);
}

.seller-id {
  font-family: 'Courier New', monospace;
  font-size: 11px;
  font-weight: 600;
  color: var(--primary);
  word-break: break-all;
}

.asin-count,
.offer-count {
  font-weight: 700;
  color: var(--success);
  font-size: 13px;
}

.shops-container {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  max-width: 180px;
}

.shop-tag {
  padding: 4px 8px;
  background: #e0f2fe;
  border: 1px solid #7dd3fc;
  border-radius: 5px;
  font-size: 10px;
  color: #0369a1;
  font-weight: 600;
  white-space: nowrap;
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: all 0.2s;
}

.shop-tag:hover {
  background: #7dd3fc;
  color: white;
  transform: scale(1.05);
}

.text-muted {
  color: var(--text-muted);
  font-size: 11px;
  font-style: italic;
}

.btn-get-detail {
  padding: 7px 12px;
  background: var(--bg);
  color: var(--primary);
  border: 1px solid var(--primary);
  border-radius: 7px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s;
}

.btn-get-detail:hover {
  background: var(--primary);
  color: white;
  transform: scale(1.05);
  box-shadow: var(--shadow);
}

.btn-get-detail .btn-icon {
  font-size: 12px;
}

/* ========== 模态框 ========== */
.modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  animation: fadeIn 0.2s;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-box {
  background: var(--bg);
  border-radius: 16px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
  max-width: 90%;
  width: 540px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.3s ease;
  overflow: hidden;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(20px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-wide {
  width: 720px;
}

.modal-head {
  padding: 18px 24px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-head h3 {
  font-size: 16px;
  font-weight: 700;
}

.modal-btns {
  display: flex;
  gap: 8px;
  align-items: center;
}

.btn-xs-white {
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: all 0.2s;
}

.btn-xs-white:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: white;
  transform: scale(1.05);
}

.btn-close-modal {
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
  transition: all 0.2s;
}

.btn-close-modal:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg) scale(1.1);
}

.modal-content {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.modal-content::-webkit-scrollbar {
  width: 8px;
}

.modal-content::-webkit-scrollbar-track {
  background: var(--bg-gray);
}

.modal-content::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--primary), var(--secondary));
  border-radius: 4px;
}

/* 导出统计 */
.export-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 20px;
  padding: 18px;
  background: var(--bg-light);
  border-radius: 12px;
}

.export-stat {
  text-align: center;
}

.export-label {
  display: block;
  font-size: 11px;
  color: var(--text-light);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.export-value {
  display: block;
  font-size: 24px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.export-time {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-light);
  background: none;
  -webkit-text-fill-color: var(--text-light);
}

.export-filters {
  display: flex;
  gap: 12px;
  margin-bottom: 18px;
}

.export-filters .input {
  flex: 1;
}

.export-list {
  max-height: 440px;
  overflow-y: auto;
  padding: 4px;
}

.export-list::-webkit-scrollbar {
  width: 8px;
}

.export-list::-webkit-scrollbar-track {
  background: var(--bg-gray);
}

.export-list::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--primary), var(--secondary));
  border-radius: 4px;
}

/* 商家卡片 */
.seller-card {
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  transition: all 0.25s;
}

.seller-card:hover {
  border-color: var(--primary);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.2);
  transform: translateY(-3px);
}

.seller-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
}

.seller-card-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-site-badge {
  padding: 5px 12px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
}

.card-seller-id {
  font-family: monospace;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}

.card-status {
  padding: 4px 10px;
  border-radius: 14px;
  font-size: 11px;
  font-weight: 700;
}

.card-status.success {
  background: #d1fae5;
  color: #065f46;
}

.card-status.pending {
  background: #fef3c7;
  color: #92400e;
}

.seller-card-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.card-link {
  padding: 5px 10px;
  color: var(--primary);
  text-decoration: none;
  font-size: 11px;
  border: 1px solid var(--primary);
  border-radius: 6px;
  font-weight: 600;
  transition: all 0.2s;
}

.card-link:hover {
  background: var(--primary);
  color: white;
}

.card-time {
  font-size: 10px;
  color: var(--text-light);
  font-weight: 500;
}

.seller-card-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.card-field {
  padding: 10px 12px;
  background: var(--bg-light);
  border-radius: 8px;
  border-left: 3px solid var(--primary);
}

.field-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.field-value {
  font-size: 12px;
  color: var(--text);
  font-weight: 600;
  line-height: 1.5;
  word-break: break-word;
}

.field-value a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 700;
}

.field-value a:hover {
  text-decoration: underline;
}

.shops-field {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}

.shop-tag-small {
  padding: 4px 8px;
  background: #e0f2fe;
  border: 1px solid #7dd3fc;
  border-radius: 5px;
  font-size: 10px;
  color: #0369a1;
  font-weight: 600;
}

.address-field div {
  margin-bottom: 4px;
  padding-left: 16px;
  position: relative;
}

.address-field div::before {
  content: '📍';
  position: absolute;
  left: 0;
  font-size: 11px;
}

/* 商家详情 */
.seller-detail-loading,
.seller-detail-error {
  text-align: center;
  padding: 50px 20px;
}

.seller-detail-info {
  font-size: 13px;
}

.detail-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--border);
  flex-wrap: wrap;
}

.detail-site-badge {
  padding: 6px 14px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  border-radius: 8px;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
}

.detail-seller-id {
  font-family: monospace;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.detail-link {
  margin-left: auto;
  padding: 6px 12px;
  color: var(--primary);
  text-decoration: none;
  font-size: 11px;
  border: 1px solid var(--primary);
  border-radius: 6px;
  font-weight: 700;
  transition: all 0.2s;
}

.detail-link:hover {
  background: var(--primary);
  color: white;
}

.detail-item {
  margin-bottom: 14px;
  padding: 14px;
  background: var(--bg-light);
  border-radius: 10px;
  border-left: 4px solid var(--primary);
  transition: all 0.2s;
}

.detail-item:hover {
  background: var(--bg-gray);
  border-left-color: var(--secondary);
}

.detail-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-light);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.detail-value {
  font-size: 13px;
  color: var(--text);
  line-height: 1.6;
  font-weight: 600;
}

.detail-value a {
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
}

.detail-value a:hover {
  text-decoration: underline;
}

/* 空状态 */
.export-empty {
  text-align: center;
  padding: 80px 20px;
}

.empty-icon {
  font-size: 60px;
  margin-bottom: 20px;
  opacity: 0.5;
}

.export-empty p {
  font-size: 14px;
  color: var(--text-light);
  font-weight: 600;
}

/* ===== 快捷操作紧凑版 ===== */
.quick-action-compact {
  margin: 12px 20px;
  padding: 10px 14px;
  background: linear-gradient(135deg, #f8fafc 0%, #e0e7ff 100%);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: all 0.2s;
}

.quick-action-compact:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.quick-action-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.quick-icon {
  font-size: 18px;
  flex-shrink: 0;
}

.quick-text {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.btn-toggle-panel {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-toggle-panel:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.btn-toggle-panel:active {
  transform: translateY(0);
}

.toggle-icon {
  font-size: 14px;
}

.toggle-text {
  font-size: 12px;
}