/* ── Reset & Base ───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
  --sidebar-w: 240px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--gray-50);
  color: var(--gray-800);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: "SF Mono", Monaco, "Cascadia Code", monospace; font-size: .88em; background: var(--gray-100); padding: 2px 6px; border-radius: 4px; }
img { max-width: 100%; }

/* ── Buttons ───────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border: 1px solid transparent; border-radius: var(--radius);
  font-size: 14px; font-weight: 500; cursor: pointer; transition: all .15s;
  text-decoration: none; white-space: nowrap; line-height: 1.4;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-outline { background: #fff; color: var(--gray-700); border-color: var(--gray-300); }
.btn-outline:hover { background: var(--gray-50); border-color: var(--gray-400); }
.btn-danger { color: var(--danger); }
.btn-danger:hover { background: #fef2f2; border-color: var(--danger); }
.btn-text { background: none; border: none; color: var(--gray-500); padding: 8px 12px; }
.btn-text:hover { color: var(--gray-700); background: var(--gray-100); }
.btn-sm { padding: 4px 8px; font-size: 13px; }
.btn-block { display: block; width: 100%; justify-content: center; }

/* ── Forms ─────────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 14px; font-weight: 500; color: var(--gray-700); margin-bottom: 4px; }
.form-input, .form-select, .form-textarea {
  width: 100%; padding: 8px 12px; border: 1px solid var(--gray-300); border-radius: var(--radius);
  font-size: 14px; font-family: inherit; color: var(--gray-800); background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79,70,229,.1);
}
.form-select { cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 32px; }
.form-textarea { resize: vertical; min-height: 80px; }
.form-row { display: flex; gap: 16px; }
.form-row .form-group { flex: 1; }
.form-hint { display: block; font-size: 12px; color: var(--gray-400); margin-top: 4px; }
.required { color: var(--danger); }

/* ── Alerts ────────────────────────────────────────────── */
.alert { padding: 12px 16px; border-radius: var(--radius); font-size: 14px; margin-bottom: 16px; }
.alert-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.alert-warning { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.alert-success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }

/* ── Badges & Tags ────────────────────────────────────── */
.badge {
  display: inline-block; padding: 2px 10px; border-radius: 20px; font-size: 12px; font-weight: 500;
}
.badge-active { background: #d1fae5; color: #065f46; }
.badge-upcoming { background: #fef3c7; color: #92400e; }
.badge-ended { background: var(--gray-100); color: var(--gray-500); }
.badge-expired { background: #fee2e2; color: #991b1b; }
.badge-success { background: #d1fae5; color: #065f46; }

.platform-tag {
  display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 12px; font-weight: 600;
}
.platform-tag.jd { background: #fee2e2; color: #dc2626; }
.platform-tag.taobao { background: #fff7ed; color: #ea580c; }
.platform-tag.tmall { background: #fef2f2; color: #db2777; }
.platform-tag.pinduoduo { background: #fefce8; color: #ca8a04; }
.platform-tag.douyin { background: #f3f4f6; color: #111827; }
.platform-tag.other { background: var(--gray-100); color: var(--gray-600); }

.type-badge {
  display: inline-block; padding: 2px 8px; border-radius: 4px;
  font-size: 12px; background: #ede9fe; color: #6d28d9;
}

/* ── Login Page ────────────────────────────────────────── */
.login-body {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
.login-card {
  background: #fff; border-radius: var(--radius-lg); padding: 40px; width: 400px;
  box-shadow: 0 20px 60px rgba(0,0,0,.15); text-align: center;
}
.login-card h1 { font-size: 48px; margin-bottom: 8px; }
.login-card h2 { font-size: 20px; color: var(--gray-800); margin-bottom: 4px; }
.login-subtitle { color: var(--gray-500); font-size: 14px; margin-bottom: 24px; }
.login-form .form-group { text-align: left; }
.login-footer { margin-top: 20px; font-size: 13px; }

/* ── Admin Layout ──────────────────────────────────────── */
.admin-body { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w); background: var(--gray-900); color: #fff;
  display: flex; flex-direction: column; position: fixed; top: 0; bottom: 0; left: 0;
  z-index: 100;
}
.sidebar-brand { padding: 20px; border-bottom: 1px solid var(--gray-700); }
.sidebar-brand h2 { font-size: 18px; font-weight: 600; }
.sidebar-nav { flex: 1; padding: 12px 0; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 20px; color: var(--gray-300); font-size: 14px;
  transition: all .15s;
}
.nav-item:hover { background: var(--gray-800); color: #fff; text-decoration: none; }
.nav-item.active { background: var(--primary); color: #fff; }
.nav-icon { font-size: 18px; width: 24px; text-align: center; }
.sidebar-footer {
  padding: 16px 20px; border-top: 1px solid var(--gray-700);
  display: flex; flex-direction: column; gap: 8px;
}
.user-info { font-size: 13px; color: var(--gray-400); }
.btn-logout { color: var(--gray-400); font-size: 13px; }
.btn-logout:hover { color: #fff; }

.main-content {
  flex: 1; margin-left: var(--sidebar-w); padding: 24px 32px;
  max-width: calc(100vw - var(--sidebar-w)); min-height: 100vh;
}
.page-header { margin-bottom: 24px; }
.page-header h1 { font-size: 24px; font-weight: 700; color: var(--gray-900); }

/* ── Stats Row ─────────────────────────────────────────── */
.stats-row { display: flex; gap: 16px; margin-bottom: 20px; }
.stat-card {
  flex: 1; background: #fff; border-radius: var(--radius); padding: 16px 20px;
  box-shadow: var(--shadow); text-align: center;
}
.stat-num { font-size: 28px; font-weight: 700; color: var(--primary); }
.stat-label { font-size: 13px; color: var(--gray-500); margin-top: 2px; }

/* ── Filter Bar ────────────────────────────────────────── */
.filter-bar { margin-bottom: 16px; }
.filter-form {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  background: #fff; padding: 12px 16px; border-radius: var(--radius); box-shadow: var(--shadow);
}
.filter-form .form-select { width: auto; min-width: 120px; }
.filter-form .form-input { width: auto; min-width: 200px; }

/* ── Table ─────────────────────────────────────────────── */
.table-wrapper {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow-x: auto;
}
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th {
  text-align: left; padding: 12px 16px; background: var(--gray-50);
  font-weight: 600; color: var(--gray-600); font-size: 13px;
  border-bottom: 2px solid var(--gray-200); white-space: nowrap;
}
.data-table td {
  padding: 12px 16px; border-bottom: 1px solid var(--gray-100); vertical-align: middle;
}
.data-table tbody tr:hover { background: var(--gray-50); }
.cell-id { color: var(--gray-400); font-size: 13px; width: 60px; }
.cell-title { font-weight: 500; min-width: 200px; }
.cell-title a { color: var(--gray-800); }
.cell-title a:hover { color: var(--primary); }
.cell-product { color: var(--gray-500); max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell-time { font-size: 13px; white-space: nowrap; }
.cell-time .time-end { color: var(--gray-400); }
.cell-actions { white-space: nowrap; }
.cell-actions .btn { padding: 4px 6px; }
.cell-url { max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell-url a { color: var(--gray-600); font-size: 13px; }
.cell-ip { font-family: monospace; font-size: 12px; color: var(--gray-400); }
.empty-cell {
  text-align: center; padding: 40px 16px !important; color: var(--gray-400);
}

/* ── Pagination ────────────────────────────────────────── */
.pagination {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 16px; padding: 12px 0;
}
.pagination-info { font-size: 13px; color: var(--gray-500); }
.pagination-links { display: flex; gap: 4px; }

/* ── Form Card (New/Edit Activity) ───────────────────── */
.form-card { background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 24px; }
.form-columns { display: flex; gap: 32px; }
.form-column { flex: 1; min-width: 0; }
.form-section { margin-bottom: 24px; }
.form-section h3 {
  font-size: 16px; font-weight: 600; color: var(--gray-800);
  margin-bottom: 16px; padding-bottom: 8px; border-bottom: 1px solid var(--gray-200);
}
.form-actions {
  display: flex; gap: 12px; padding-top: 20px; border-top: 1px solid var(--gray-200);
}
.current-screenshot img { display: block; }

/* ── Detail Card ───────────────────────────────────────── */
.detail-card {
  background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 24px;
}
.detail-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px solid var(--gray-200);
}
.detail-title-row { display: flex; align-items: center; gap: 12px; }
.detail-title-row h2 { font-size: 22px; }
.detail-actions { display: flex; gap: 8px; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 24px; }
.detail-item { display: flex; flex-direction: column; gap: 4px; }
.detail-item.full-width { grid-column: 1 / -1; }
.detail-label { font-size: 13px; font-weight: 500; color: var(--gray-500); }
.detail-value { font-size: 14px; color: var(--gray-800); }
.pre-wrap { white-space: pre-wrap; }
.risk-text { color: #92400e; background: #fffbeb; padding: 8px 12px; border-radius: var(--radius); }
.detail-screenshot { max-width: 400px; border-radius: var(--radius); border: 1px solid var(--gray-200); cursor: pointer; }
.detail-footer { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--gray-200); }

/* ── Query Tool Homepage ───────────────────────────────── */
.query-body {
  min-height: 100vh; background: linear-gradient(135deg, #f5f3ff 0%, #e0e7ff 50%, #f0f9ff 100%);
}
.query-container { max-width: 800px; margin: 0 auto; padding: 60px 20px 40px; }
.query-header { text-align: center; margin-bottom: 32px; }
.query-header h1 { font-size: 32px; font-weight: 800; color: var(--gray-900); margin-bottom: 8px; }
.query-header .subtitle { font-size: 16px; color: var(--gray-500); }
.query-header .hint { font-size: 13px; color: var(--gray-400); margin-top: 4px; }

.query-form { margin-bottom: 24px; }
.input-group { display: flex; gap: 12px; }
.input-group input[type="url"] {
  flex: 1; padding: 14px 20px; border: 2px solid var(--gray-300); border-radius: var(--radius-lg);
  font-size: 16px; outline: none; transition: border-color .2s; box-shadow: var(--shadow-md);
}
.input-group input[type="url"]:focus { border-color: var(--primary); }
.input-group .btn { padding: 14px 32px; font-size: 16px; border-radius: var(--radius-lg); }

.loading { text-align: center; padding: 40px; }
.spinner {
  width: 40px; height: 40px; border: 3px solid var(--gray-200); border-top-color: var(--primary);
  border-radius: 50%; animation: spin .8s linear infinite; margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Result Cards (Query) ──────────────────────────────── */
.result-card { background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-md); overflow: hidden; margin-bottom: 20px; }
.result-header {
  display: flex; align-items: center; gap: 12px; padding: 12px 20px;
  background: var(--gray-50); border-bottom: 1px solid var(--gray-200); font-size: 14px;
}
.no-activity .result-header { background: #fffbeb; }
.no-result-message { text-align: center; padding: 40px 20px; }
.no-result-icon { font-size: 48px; margin-bottom: 12px; }
.no-result-message p { margin-bottom: 4px; }
.no-result-hint { font-size: 13px; color: var(--gray-400); }

.activity-card { padding: 16px 20px; border-bottom: 1px solid var(--gray-100); }
.activity-card:last-child { border-bottom: none; }
.activity-card-header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.activity-card-header h3 { font-size: 16px; font-weight: 600; }
.activity-meta { display: flex; flex-wrap: wrap; gap: 12px; font-size: 13px; color: var(--gray-500); margin-bottom: 8px; }
.meta-tag { background: #ede9fe; color: #6d28d9; padding: 2px 8px; border-radius: 4px; font-weight: 500; }
.activity-rule, .activity-steps, .activity-risk { font-size: 14px; margin-top: 6px; padding: 8px 12px; border-radius: var(--radius); }
.activity-rule { background: #f0f9ff; }
.activity-steps { background: #f0fdf4; }
.activity-risk { background: #fffbeb; color: #92400e; }

/* ── Example Links ─────────────────────────────────────── */
.example-links { background: #fff; border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow); margin-bottom: 20px; }
.example-links h3 { font-size: 15px; margin-bottom: 12px; }
.example-grid { display: flex; gap: 12px; flex-wrap: wrap; }
.example-item {
  display: flex; align-items: center; gap: 8px; padding: 10px 16px;
  background: var(--gray-50); border: 1px solid var(--gray-200); border-radius: var(--radius);
  cursor: pointer; font-size: 13px; transition: all .15s; font-family: inherit;
}
.example-item:hover { border-color: var(--primary); background: #fff; }
.example-item code { font-size: 12px; background: none; padding: 0; }

.feature-list { background: #fff; border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow); }
.feature-list h3 { font-size: 15px; margin-bottom: 12px; }
.feature-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.feature-item {
  padding: 8px 16px; background: var(--gray-50); border-radius: 20px;
  font-size: 14px; color: var(--gray-700);
}

.query-footer { text-align: center; padding: 20px; font-size: 13px; color: var(--gray-400); display: flex; justify-content: center; gap: 12px; }
.query-footer a { color: var(--gray-400); }

/* ── Product Card (Query Result) ────────────────────────── */
.product-card {
  display: flex; gap: 20px; background: #fff; border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md); padding: 20px; margin-bottom: 20px;
}
.product-image { flex-shrink: 0; width: 160px; height: 160px; display: flex; align-items: center; justify-content: center; background: var(--gray-50); border-radius: var(--radius); overflow: hidden; }
.product-image img { max-width: 100%; max-height: 100%; object-fit: contain; }
.product-info { flex: 1; min-width: 0; }
.product-title-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.product-brand { font-size: 13px; color: var(--gray-500); }
.product-name { font-size: 18px; font-weight: 700; color: var(--gray-900); margin-bottom: 8px; line-height: 1.4; }
.product-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.product-price { font-size: 24px; font-weight: 700; color: #e02d2d; }
.product-shop { font-size: 13px; color: var(--gray-500); }
.product-tag { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 12px; background: #fef3c7; color: #92400e; }

/* ── Section Title ──────────────────────────────────────── */
.section-title {
  font-size: 16px; color: var(--gray-700); margin-bottom: 12px;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}

/* ── Deal Badges ────────────────────────────────────────── */
.db-badge {
  display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 11px;
  background: #e0e7ff; color: #3730a3;
}
.deal-badge {
  display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 11px;
  background: #fce7f3; color: #9d174d;
}
.deal-price { font-size: 18px; font-weight: 700; color: #e02d2d; }
.deal-tag {
  display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 11px;
  background: #d1fae5; color: #065f46; font-weight: 500;
}

.activity-result { margin-bottom: 12px; }

/* ── Price Detail Card ─────────────────────────────────── */
.price-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 16px;
}
.price-cell {
  background: var(--gray-50); border-radius: var(--radius); padding: 12px;
  text-align: center;
}
.price-cell .price-label {
  font-size: 12px; color: var(--gray-400); margin-bottom: 4px;
}
.price-cell .price-value {
  font-size: 20px; font-weight: 700; color: var(--gray-800);
}
.price-cell .price-value.highlight { color: #e02d2d; }
.price-cell .price-value.commission { color: #6d28d9; }
.price-cell .price-value.rebate { color: #059669; }
.price-cell .price-value.original { color: var(--gray-400); text-decoration: line-through; font-size: 16px; }

/* ── Coupon Badge ─────────────────────────────────────── */
.coupon-badge {
  display: inline-block; padding: 4px 12px; border-radius: 4px;
  background: #fef3c7; color: #d97706; font-weight: 600; font-size: 14px;
}
.no-coupon { color: var(--gray-400); font-size: 13px; }

/* ── Commission Row ───────────────────────────────────── */
.commission-row {
  display: flex; gap: 16px; align-items: center; margin-top: 12px; flex-wrap: wrap;
}
.commission-item {
  padding: 8px 16px; border-radius: var(--radius); font-size: 14px;
}
.commission-item.rate { background: #ede9fe; color: #6d28d9; }
.commission-item.amount { background: #f0fdf4; color: #059669; }
.commission-item.rebate { background: #f0f9ff; color: #0369a1; }

/* ── Analysis / Recommendation ────────────────────────── */
.analysis-card {
  background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-md);
  padding: 20px; margin-bottom: 20px;
}
.analysis-header { font-size: 18px; font-weight: 700; margin-bottom: 16px; }

.recommendation-banner {
  display: flex; align-items: center; gap: 16px; padding: 16px 20px; border-radius: var(--radius);
  font-weight: 600; margin-bottom: 16px;
}
.recommendation-banner.buy_now { background: #d1fae5; color: #065f46; border: 2px solid #10b981; }
.recommendation-banner.can_wait { background: #fef3c7; color: #92400e; border: 2px solid #f59e0b; }
.recommendation-banner.not_recommended { background: #fee2e2; color: #991b1b; border: 2px solid #ef4444; }
.verdict-icon { font-size: 36px; }
.verdict-text { font-size: 18px; }
.verdict-score { font-size: 14px; color: var(--gray-500); margin-left: auto; }

.reason-list { list-style: none; padding: 0; }
.reason-list li { padding: 6px 0; font-size: 14px; color: var(--gray-700); }

/* ── Price Stats Row ──────────────────────────────────── */
.price-stats-row {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 16px;
}
.stat-item {
  background: var(--gray-50); border-radius: var(--radius); padding: 12px; text-align: center;
}
.stat-item .stat-label { font-size: 12px; color: var(--gray-400); }
.stat-item .stat-value { font-size: 18px; font-weight: 700; color: var(--gray-800); }
.stat-item .stat-value.lowest { color: #059669; }
.stat-item .stat-value.highest { color: #dc2626; }

/* ── Price Chart ──────────────────────────────────────── */
.chart-container {
  background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-md);
  padding: 20px; margin-bottom: 20px;
}
.chart-header {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px;
}
.chart-header h3 { font-size: 16px; font-weight: 700; }
.chart-tabs { display: flex; gap: 4px; }
.chart-tab {
  padding: 4px 12px; border: 1px solid var(--gray-300); border-radius: var(--radius);
  background: #fff; cursor: pointer; font-size: 13px; font-family: inherit;
}
.chart-tab.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.chart-wrapper { position: relative; height: 320px; }
.chart-wrapper canvas { width: 100% !important; }

/* ── Activity Section ─────────────────────────────────── */
.activity-section { margin-top: 16px; }
.activity-row {
  display: flex; gap: 8px; align-items: center; padding: 8px 12px;
  background: var(--gray-50); border-radius: var(--radius); margin-bottom: 6px;
}
.activity-row .status-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}
.status-dot.active { background: #10b981; }
.status-dot.upcoming { background: #f59e0b; }

/* ── History & Commission Sidebar ─────────────────────── */
.result-layout { display: flex; gap: 20px; }
.result-main { flex: 1; min-width: 0; }
.result-sidebar { width: 340px; flex-shrink: 0; }

.sidebar-card {
  background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-md);
  padding: 16px; margin-bottom: 20px;
}
.sidebar-card h3 { font-size: 15px; font-weight: 700; margin-bottom: 12px; }

.history-item {
  display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--gray-100);
}
.history-item:last-child { border-bottom: none; }
.history-img {
  width: 48px; height: 48px; border-radius: 4px; object-fit: cover; flex-shrink: 0;
  background: var(--gray-100);
}
.history-info { flex: 1; min-width: 0; }
.history-title {
  font-size: 13px; color: var(--gray-800); overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; font-weight: 500;
}
.history-meta { font-size: 12px; color: var(--gray-500); }
.history-price { font-size: 14px; font-weight: 700; color: #e02d2d; }

.commission-stat-row {
  display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--gray-100);
  font-size: 14px;
}
.commission-stat-row:last-child { border-bottom: none; }
.commission-stat-value { font-weight: 700; color: var(--gray-800); }

/* ── Platform Tabs ────────────────────────────────────── */
.platform-tabs { display: flex; gap: 8px; justify-content: center; margin-bottom: 12px; }
.platform-tab {
  display: flex; align-items: center; gap: 6px; padding: 10px 20px;
  border: 2px solid var(--gray-200); border-radius: var(--radius-lg);
  cursor: pointer; font-size: 14px; font-family: inherit; background: #fff;
  transition: all .15s;
}
.platform-tab:hover { border-color: var(--primary); }
.platform-tab.selected { border-color: var(--primary); background: #eef2ff; }
.platform-tab .tab-icon { font-size: 20px; }

/* ── Tab Panels ───────────────────────────────────────── */
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 768px) {
  .sidebar { width: 60px; }
  .sidebar-brand h2, .nav-item span:not(.nav-icon), .sidebar-footer span, .btn-logout { display: none; }
  .main-content { margin-left: 60px; }
  .form-row, .form-columns { flex-direction: column; }
  .detail-grid { grid-template-columns: 1fr; }
  .input-group { flex-direction: column; }
  .filter-form { flex-direction: column; }
  .filter-form .form-select, .filter-form .form-input { width: 100%; }
  .result-layout { flex-direction: column; }
  .result-sidebar { width: 100%; }
  .price-grid { grid-template-columns: repeat(2, 1fr); }
  .price-stats-row { grid-template-columns: repeat(2, 1fr); }
}
