* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: #1a1a2e;
  min-height: 100vh;
  padding: 12px;
  color: #333;
}

.container {
  max-width: 1600px;
  margin: 0 auto;
  background: #16213e;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 20px 30px;
  text-align: center;
}

header h1 { font-size: 26px; margin-bottom: 4px; }
.subtitle { opacity: 0.9; font-size: 14px; }

/* ==================== TAB NAV ==================== */

.tab-nav {
  display: flex;
  background: #0f3460;
  border-bottom: 2px solid #1a1a2e;
}

.tab-btn {
  flex: 1;
  padding: 14px 20px;
  border: none;
  background: transparent;
  color: #8899aa;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.tab-btn:hover { background: rgba(255,255,255,0.05); color: #ccc; }
.tab-btn.active { color: #fff; background: #16213e; border-bottom: 3px solid #667eea; }

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

/* ==================== BATTLE ARENA ==================== */

.arena-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: #1a1a2e;
  flex-wrap: wrap;
}

.arena-stats {
  margin-left: auto;
  display: flex;
  gap: 12px;
}

.arena-stat {
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
}

.arena-stat.winning { background: #51cf66; color: #1a3a1a; }
.arena-stat.losing { background: #ff6b6b; color: #3a1a1a; }
.arena-stat.mixed { background: #ffc942; color: #3a3a1a; }

.tiles-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 16px 20px;
  align-content: flex-start;
}

.empty-arena {
  width: 100%;
  text-align: center;
  padding: 60px 20px;
  color: #667;
  font-style: italic;
  font-size: 16px;
}

/* ==================== BATTLE TILE ==================== */

.battle-tile {
  width: 260px;
  border-radius: 10px;
  padding: 10px 10px 8px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.battle-tile::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, rgba(255,255,255,0.3), rgba(255,255,255,0.05));
}

.battle-tile:hover {
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 8px 28px rgba(0,0,0,0.35);
  z-index: 2;
}

/* Top bar with score */
.tile-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.tile-score-badge {
  padding: 1px 8px;
  border-radius: 8px;
  font-size: 9px;
  font-weight: 800;
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tile-pct {
  font-size: 16px;
  font-weight: 900;
  color: rgba(0,0,0,0.5);
}

.tile-dark-text .tile-pct { color: rgba(255,255,255,0.6); }

/* Fighters row */
.tile-fighters {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  gap: 2px;
}

.tile-fighter {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  min-width: 0;
}

.tile-img-wrap {
  width: 90px;
  height: 90px;
  border-radius: 10px;
  padding: 4px;
  background: rgba(255,255,255,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  transition: box-shadow 0.2s;
}

.battle-tile:hover .tile-img-wrap {
  box-shadow: 0 4px 14px rgba(0,0,0,0.2);
}

.ours-glow { border: 2px solid rgba(34,139,230,0.5); }
.comp-glow { border: 2px solid rgba(224,49,49,0.4); }

.tile-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 6px;
}

.tile-name {
  font-size: 10px;
  font-weight: 700;
  text-align: center;
  color: rgba(0,0,0,0.75);
  margin-top: 3px;
  line-height: 1.25;
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tile-badge {
  font-size: 7px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 1px 6px;
  border-radius: 6px;
  margin-top: 2px;
  background: rgba(34,139,230,0.2);
  color: rgba(0,0,0,0.55);
}

.tile-badge.comp {
  background: rgba(224,49,49,0.15);
}

.tile-vs-circle {
  font-size: 18px;
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.1);
  border-radius: 50%;
}

.tile-dark-text .tile-name { color: rgba(255,255,255,0.9); }
.tile-dark-text .tile-badge { color: rgba(255,255,255,0.7); background: rgba(255,255,255,0.15); }
.tile-dark-text .tile-badge.comp { background: rgba(255,255,255,0.1); }
.tile-dark-text .tile-vs-circle { background: rgba(255,255,255,0.1); }

/* Metric rows inside tile */
.tile-metrics {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: rgba(0,0,0,0.06);
  border-radius: 8px;
  padding: 3px 6px;
  margin-top: 2px;
}

.tile-dark-text .tile-metrics { background: rgba(255,255,255,0.08); }

.metric-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  padding: 2px 0;
  color: rgba(0,0,0,0.8);
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.metric-row:last-child { border-bottom: none; }

.tile-dark-text .metric-row {
  color: rgba(255,255,255,0.85);
  border-bottom-color: rgba(255,255,255,0.08);
}

.metric-val {
  flex: 0 0 52px;
  font-weight: 700;
  font-size: 11px;
  color: rgba(0,0,0,0.75);
}

.tile-dark-text .metric-val { color: rgba(255,255,255,0.8); }

.metric-val.right { text-align: right; }

.metric-val.winner {
  font-weight: 800;
  color: rgba(0,0,0,0.95);
}

.tile-dark-text .metric-val.winner { color: #fff; }

.metric-label-text {
  flex: 1;
  text-align: center;
  font-size: 9px;
  font-weight: 600;
  color: rgba(0,0,0,0.6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 2px;
}

.tile-dark-text .metric-label-text { color: rgba(255,255,255,0.55); }

/* ==================== MATCHUP DETAIL MODAL ==================== */

.modal-wide { max-width: 800px; }

.detail-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 20px;
  padding: 10px 0;
}

.detail-side {
  text-align: center;
}

.detail-side h3 {
  font-size: 16px;
  margin: 8px 0;
  color: #333;
}

.detail-img {
  width: 100px;
  height: 100px;
  object-fit: contain;
  border-radius: 8px;
  background: #f8f9fa;
  padding: 4px;
}

.amazon-link {
  color: #667eea;
  text-decoration: none;
  font-size: 13px;
}

.detail-stats {
  text-align: left;
  margin-top: 12px;
  font-size: 14px;
  line-height: 2;
}

.detail-vs {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.detail-score {
  font-size: 32px;
  font-weight: 900;
  padding: 8px 16px;
  border-radius: 12px;
}

.score-winning { background: #d4edda; color: #155724; }
.score-losing { background: #f8d7da; color: #721c24; }
.score-tied { background: #fff3cd; color: #856404; }

.detail-verdict {
  font-size: 14px;
  font-weight: 600;
}

/* ==================== PRODUCTS TAB ==================== */

.action-bar {
  padding: 16px 30px;
  display: flex;
  gap: 12px;
  background: #1a1a2e;
  border-bottom: 1px solid #0f3460;
}

.stats-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  padding: 20px 30px;
  background: #16213e;
}

.stat-card {
  background: #0f3460;
  padding: 16px;
  border-radius: 8px;
  text-align: center;
  border: 1px solid #1a1a2e;
}

.stat-value { font-size: 26px; font-weight: bold; color: #667eea; margin-bottom: 4px; }
.stat-label { font-size: 13px; color: #8899aa; text-transform: uppercase; letter-spacing: 0.5px; }

.table-container {
  padding: 0 30px 30px;
  overflow-x: auto;
  background: #16213e;
}

table { width: 100%; border-collapse: collapse; font-size: 14px; }
thead { background: #0f3460; }
th { padding: 12px; text-align: left; font-weight: 600; color: #aab; border-bottom: 2px solid #1a1a2e; }
td { padding: 12px; border-bottom: 1px solid #0f3460; color: #ccd; }
tr:hover { background: rgba(102, 126, 234, 0.05); }
.empty-state { text-align: center; padding: 60px 20px; color: #667; font-style: italic; }
.bsr-good { color: #51cf66; font-weight: 600; }
.bsr-medium { color: #ffc107; font-weight: 600; }
.bsr-poor { color: #ff6b6b; font-weight: 600; }
.sales-high { color: #51cf66; font-weight: 600; }
.sales-medium { color: #ffc107; font-weight: 600; }
.sales-low { color: #ff6b6b; font-weight: 600; }

/* ==================== BUTTONS ==================== */

.btn {
  padding: 10px 18px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-primary { background: #667eea; color: white; }
.btn-primary:hover { background: #5568d3; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(102,126,234,0.4); }
.btn-secondary { background: #764ba2; color: white; }
.btn-secondary:hover { background: #63408a; }
.btn-outline { background: transparent; color: #667eea; border: 2px solid #667eea; }
.btn-outline:hover { background: #667eea; color: white; }
.btn-small { padding: 6px 12px; font-size: 13px; }
.btn-danger { background: #dc3545; color: white; }
.btn-danger:hover { background: #c82333; }

/* ==================== MODALS ==================== */

.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.6);
  animation: fadeIn 0.2s;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-content {
  background: white;
  margin: 5% auto;
  max-width: 600px;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.3);
  animation: slideDown 0.3s;
  max-height: 90vh;
  overflow-y: auto;
}

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

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid #e9ecef;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 12px 12px 0 0;
}

.modal-header h2 { font-size: 20px; margin: 0; }
.close { font-size: 28px; font-weight: 300; cursor: pointer; opacity: 0.8; }
.close:hover { opacity: 1; }
.modal-body { padding: 24px; }

.modal-footer {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding: 16px 24px;
  border-top: 1px solid #e9ecef;
}

.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 4px; font-weight: 500; color: #495057; }
.form-group input, .form-group select {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid #e9ecef;
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.2s;
}
.form-group input:focus, .form-group select:focus { outline: none; border-color: #667eea; }
.form-group small { display: block; margin-top: 4px; color: #6c757d; font-size: 12px; }

/* Upload zone */
.upload-instructions { background: #f8f9fa; padding: 14px; border-radius: 8px; margin-bottom: 16px; }
.upload-instructions p { margin-bottom: 6px; }

.upload-zone {
  border: 3px dashed #dee2e6;
  border-radius: 8px;
  padding: 36px;
  text-align: center;
  transition: all 0.3s;
  cursor: pointer;
}
.upload-zone:hover { border-color: #667eea; background: #f8f9fa; }
.upload-zone.drag-over { border-color: #667eea; background: #e7f1ff; }
.upload-icon { font-size: 40px; margin-bottom: 8px; }
.upload-text { font-size: 15px; font-weight: 500; margin-bottom: 6px; }
.upload-subtext { color: #6c757d; margin-bottom: 12px; }

.progress-bar { width: 100%; height: 28px; background: #e9ecef; border-radius: 14px; overflow: hidden; margin-bottom: 10px; }
.progress-fill { height: 100%; background: linear-gradient(90deg, #667eea, #764ba2); transition: width 0.3s; display: flex; align-items: center; justify-content: center; color: white; font-weight: 500; font-size: 12px; }

.result-item { padding: 10px; border-radius: 6px; margin-bottom: 6px; }
.result-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.result-error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.result-warning { background: #fff3cd; color: #856404; border: 1px solid #ffeaa7; }

/* ==================== TOAST NOTIFICATIONS ==================== */

.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 12px 20px;
  border-radius: 8px;
  color: white;
  font-weight: 500;
  font-size: 14px;
  z-index: 9999;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s;
  max-width: 400px;
}

.toast.show { opacity: 1; transform: translateY(0); }
.toast-success { background: #28a745; }
.toast-error { background: #dc3545; }

/* ==================== CHART SECTION ==================== */

.chart-section {
  padding: 0 24px 24px;
  border-top: 1px solid #e9ecef;
}

.chart-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 0 8px;
  flex-wrap: wrap;
}

.chart-toolbar-label {
  font-size: 16px;
  font-weight: 700;
  color: #333;
}

.chart-toggle-group {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.chart-toggle-btn {
  padding: 5px 12px;
  border: 2px solid #dee2e6;
  border-radius: 20px;
  background: #f8f9fa;
  color: #495057;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.chart-toggle-btn:hover {
  border-color: #667eea;
  color: #667eea;
}

.chart-toggle-btn.active {
  background: #667eea;
  color: white;
  border-color: #667eea;
}

.chart-container {
  position: relative;
  height: 300px;
  margin-top: 8px;
}

.chart-container canvas {
  max-height: 300px;
}

.chart-loading {
  text-align: center;
  padding: 40px;
  color: #6c757d;
  font-style: italic;
}

/* ==================== PROJECTS TAB ==================== */

.projects-toolbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: #1a1a2e;
  border-bottom: 1px solid #0f3460;
}

.project-search-wrapper {
  position: relative;
  min-width: 320px;
}

.project-search-input {
  width: 100%;
  padding: 10px 14px;
  border: 2px solid #0f3460;
  border-radius: 6px;
  background: #16213e;
  color: #ccd;
  font-size: 14px;
  font-weight: 500;
  transition: border-color 0.2s;
}

.project-search-input:focus {
  outline: none;
  border-color: #667eea;
}

.project-search-input::placeholder {
  color: #667;
}

.project-dropdown-list {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 300px;
  overflow-y: auto;
  background: #16213e;
  border: 2px solid #667eea;
  border-top: none;
  border-radius: 0 0 6px 6px;
  z-index: 100;
}

.project-dropdown-item {
  padding: 8px 14px;
  color: #ccd;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s;
}

.project-dropdown-item:hover {
  background: #0f3460;
}

.project-dropdown-item.selected {
  background: #667eea;
  color: white;
}

.project-dropdown-empty {
  padding: 12px 14px;
  color: #667;
  font-style: italic;
  font-size: 13px;
}

.project-stat {
  font-size: 13px;
  color: #8899aa;
  font-weight: 600;
}

.empty-projects {
  text-align: center;
  padding: 60px 20px;
  color: #667;
  font-style: italic;
  font-size: 16px;
}

.projects-table-container {
  overflow-x: auto;
  overflow-y: auto;
  max-height: calc(100vh - 200px);
  background: #16213e;
  position: relative;
}

.projects-table {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}

.projects-table thead {
  position: sticky;
  top: 0;
  z-index: 20;
}

.projects-table th {
  padding: 8px 10px;
  text-align: center;
  font-weight: 600;
  color: #aab;
  background: #0f3460;
  border-bottom: 2px solid #1a1a2e;
  border-right: 1px solid #1a1a2e;
  white-space: nowrap;
}

.projects-table th small {
  font-size: 10px;
  color: #667;
  font-weight: 400;
}

.projects-table td {
  padding: 4px 8px;
  border-bottom: 1px solid rgba(15, 52, 96, 0.5);
  border-right: 1px solid rgba(15, 52, 96, 0.3);
  white-space: nowrap;
  text-align: center;
  font-size: 12px;
}

.projects-table tbody tr:hover td {
  filter: brightness(0.9);
}

.projects-table tbody tr:hover .sticky-col {
  background: #0d2d50;
  filter: none;
}

/* Sticky columns: keyword and sales */
.sticky-col {
  position: sticky;
  z-index: 10;
  background: #16213e;
}

.sticky-col-1 {
  left: 0;
  min-width: 220px;
  max-width: 280px;
  text-align: left !important;
}

.sticky-col-2 {
  left: 220px;
  min-width: 80px;
  text-align: right !important;
}

.projects-table thead .sticky-col {
  z-index: 30;
  background: #0f3460;
}

.kw-cell {
  color: #ccd;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sales-cell {
  color: #8899aa;
  font-weight: 600;
  font-size: 12px;
}

.asin-header-img {
  padding: 6px !important;
}

.asin-thumb {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 6px;
  background: rgba(255,255,255,0.9);
  padding: 2px;
}

.asin-thumb-placeholder {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  background: #0f3460;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #667;
  font-size: 18px;
  margin: 0 auto;
}

.asin-header-label {
  font-size: 11px !important;
  min-width: 100px;
}

.rank-cell {
  font-weight: 600;
  font-size: 12px;
  min-width: 70px;
  transition: filter 0.15s;
}

.rank-num {
  font-weight: 700;
}

.rank-yesterday {
  font-weight: 400;
  opacity: 0.7;
  font-size: 11px;
}

.rank-up {
  color: #1b5e20;
  font-weight: 700;
  font-size: 11px;
}

.rank-down {
  color: #b71c1c;
  font-weight: 700;
  font-size: 11px;
}

.rank-empty {
  color: #999;
  font-weight: 400;
}

/* 3-day rank cells */
.rank-day-cell {
  min-width: 44px !important;
  padding: 4px 4px !important;
  font-size: 12px;
}

/* Date header row */
.date-header {
  font-size: 9px !important;
  font-weight: 500 !important;
  color: #667 !important;
  padding: 2px 4px !important;
  white-space: nowrap;
}

/* Sortable headers */
.sortable-header {
  cursor: pointer;
  user-select: none;
  transition: color 0.2s;
}

.sortable-header:hover {
  color: #667eea !important;
}

.sort-arrow {
  font-size: 10px;
  color: #667eea;
}

/* ==================== OPPORTUNITIES TAB ==================== */

.opp-filter-bar {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  padding: 16px 20px;
  background: #1a1a2e;
  border-bottom: 1px solid #0f3460;
  flex-wrap: wrap;
}

.opp-filter-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.opp-filter-group label {
  font-size: 11px;
  font-weight: 600;
  color: #8899aa;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.opp-filter-input {
  padding: 10px 12px;
  border: 2px solid #0f3460;
  border-radius: 6px;
  background: #16213e;
  color: #ccd;
  font-size: 14px;
  width: 120px;
  transition: border-color 0.2s;
}

.opp-filter-input:focus {
  outline: none;
  border-color: #667eea;
}

.opp-filter-input-sm {
  width: 70px;
}

.opp-filter-buttons {
  flex-direction: row;
  align-items: flex-end;
  gap: 8px;
  margin-left: auto;
}

/* Summary cards */
.opp-summary-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding: 20px 20px 12px;
  background: #16213e;
}

.opp-summary-card {
  background: #0f3460;
  padding: 18px 16px;
  border-radius: 10px;
  text-align: center;
  border: 1px solid #1a1a2e;
}

.opp-summary-value {
  font-size: 30px;
  font-weight: 800;
  color: #667eea;
  margin-bottom: 4px;
}

.opp-summary-value.opp-revenue {
  color: #51cf66;
}

.opp-summary-value.opp-page1 {
  color: #ffc942;
}

.opp-summary-label {
  font-size: 12px;
  color: #8899aa;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

/* Table */
.opp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.opp-table thead {
  background: #0f3460;
}

.opp-table th {
  padding: 10px 12px;
  text-align: left;
  font-weight: 600;
  color: #aab;
  border-bottom: 2px solid #1a1a2e;
  white-space: nowrap;
  user-select: none;
}

.opp-sortable {
  cursor: pointer;
  transition: color 0.2s;
}

.opp-sortable:hover {
  color: #667eea !important;
}

.opp-table td {
  padding: 8px 12px;
  border-bottom: 1px solid #0f3460;
  color: #ccd;
  vertical-align: middle;
}

.opp-table tr:hover {
  background: rgba(102, 126, 234, 0.06);
}

/* Product cell */
.opp-product-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 200px;
}

.opp-product-img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: 6px;
  background: rgba(255,255,255,0.9);
  padding: 2px;
  flex-shrink: 0;
}

.opp-product-name {
  font-weight: 600;
  font-size: 13px;
  color: #dde;
  line-height: 1.3;
}

.opp-product-asin {
  font-size: 11px;
  color: #667;
}

.opp-keyword-cell {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}

/* Rank box */
.opp-rank-box {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 13px;
  color: #1a1a1a;
  min-width: 44px;
  text-align: center;
}

/* Rank trend mini boxes */
.opp-trend-boxes {
  display: flex;
  gap: 3px;
}

.opp-rank-mini {
  display: inline-block;
  width: 28px;
  height: 22px;
  line-height: 22px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  text-align: center;
  color: #1a1a1a;
}

/* Score badge */
.opp-score-badge {
  display: inline-block;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  padding: 3px 10px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 12px;
}

/* Revenue cell */
.opp-revenue-cell {
  font-weight: 700;
  color: #51cf66 !important;
}

/* Bucket badges */
.opp-bucket {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.opp-bucket-almost_page1 {
  background: #51cf66;
  color: #1a3a1a;
}

.opp-bucket-strong_page2 {
  background: #69db7c;
  color: #1a3a1a;
}

.opp-bucket-mid_page2 {
  background: #ffc942;
  color: #3a3a1a;
}

.opp-bucket-reachable {
  background: #ff922b;
  color: #3a2a1a;
}

/* ==================== RESPONSIVE ==================== */

@media (max-width: 768px) {
  .battle-tile { width: 100%; }
  .tiles-grid { gap: 6px; padding: 8px; }
  .arena-toolbar { flex-direction: column; }
  .arena-stats { margin-left: 0; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-vs { flex-direction: row; padding: 10px 0; }
  .action-bar { flex-direction: column; }
  .stats-cards { grid-template-columns: 1fr; }
  .opp-summary-cards { grid-template-columns: repeat(2, 1fr); }
  .opp-filter-bar { flex-direction: column; align-items: stretch; }
  .opp-filter-buttons { margin-left: 0; }
}

@media (max-width: 400px) {
  body { padding: 4px; }
  header { padding: 14px; }
  header h1 { font-size: 20px; }
}
