:root {
  --bg-dark: #0b0f19;
  --bg-card: rgba(22, 29, 47, 0.7);
  --bg-card-hover: rgba(30, 41, 67, 0.9);
  --bg-glass: rgba(16, 23, 38, 0.85);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(99, 102, 241, 0.5);

  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --primary-glow: rgba(99, 102, 241, 0.35);

  --accent-gold: #f59e0b;
  --accent-green: #10b981;
  --accent-blue: #0ea5e9;
  --accent-red: #ef4444;
  --accent-purple: #8b5cf6;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-sans);
  min-height: 100vh;
  line-height: 1.5;
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(99, 102, 241, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 85% 20%, rgba(139, 92, 246, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 50% 80%, rgba(16, 185, 129, 0.05) 0%, transparent 50%);
  background-attachment: fixed;
}

/* NAVBAR */
.navbar {
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 50;
}

.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary), var(--accent-purple));
  color: #fff;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: 0 0 15px var(--primary-glow);
}

.brand-title {
  font-size: 1.35rem;
  letter-spacing: -0.5px;
}

.brand-title strong {
  background: linear-gradient(90deg, #818cf8, #c084fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-badge {
  display: block;
  font-size: 0.68rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
}

/* BUTTONS */
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  padding: 0.75rem 1.5rem;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px var(--primary-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--primary-glow);
}

.btn-primary .btn-loading {
  display: none;
}

.btn-primary.loading .btn-text {
  display: none;
}

.btn-primary.loading .btn-loading {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.6rem 1.2rem;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-focus);
}

/* MAIN CONTAINER */
.main-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 5rem 1.5rem;
}

/* SEARCH SECTION */
.search-section {
  margin-bottom: 2.5rem;
}

.search-box-wrapper {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2.2rem;
  box-shadow: var(--shadow-lg);
}

.search-header {
  text-align: center;
  margin-bottom: 1.8rem;
}

.search-header h1 {
  font-size: 2.1rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 0.5rem;
}

.search-header h1 span {
  background: linear-gradient(90deg, #f59e0b, #ec4899, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.search-header p {
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: 600px;
  margin: 0 auto;
}

.search-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.search-input-group {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 1.25rem;
  color: var(--text-dim);
  font-size: 1.15rem;
}

.search-input-group input {
  width: 100%;
  padding: 1.1rem 1.25rem 1.1rem 3.2rem;
  background: rgba(11, 15, 25, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 1.05rem;
  outline: none;
  transition: all 0.2s ease;
}

.search-input-group input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.search-controls {
  display: grid;
  grid-template-columns: 1fr 1.2fr 0.9fr auto;
  gap: 1rem;
  align-items: end;
}

@media (max-width: 900px) {
  .search-controls {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  .search-controls {
    grid-template-columns: 1fr;
  }
}

.select-wrapper {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.select-wrapper label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.select-wrapper select, .custom-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding: 0.75rem 2.4rem 0.75rem 1rem;
  background: rgba(15, 23, 42, 0.9) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") no-repeat right 14px center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  color: #f8fafc;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  outline: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.select-wrapper select:hover, .custom-select:hover {
  border-color: rgba(255, 255, 255, 0.25);
  background-color: rgba(22, 30, 52, 0.95);
}

.select-wrapper select:focus, .custom-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.custom-checkbox-label {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.custom-checkbox-label input[type="checkbox"] {
  display: none;
}

.checkbox-box {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  color: #94a3b8;
  font-size: 0.85rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  width: 100%;
  justify-content: center;
}

.custom-checkbox-label input[type="checkbox"]:checked + .checkbox-box {
  background: rgba(245, 158, 11, 0.15);
  border-color: #f59e0b;
  color: #fcd34d;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.2);
}

.btn-primary .btn-loading, .btn-primary .btn-loader {
  display: none !important;
}

.btn-primary.loading .btn-text {
  display: none !important;
}

.btn-primary.loading .btn-loading, .btn-primary.loading .btn-loader {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.quick-tags {
  margin-top: 1.25rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-label {
  font-size: 0.8rem;
  color: var(--text-dim);
  font-weight: 600;
}

.quick-tag {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.quick-tag:hover {
  background: rgba(99, 102, 241, 0.15);
  border-color: var(--primary);
  color: #fff;
}

/* STATE CONTAINERS */
.state-container {
  text-align: center;
  padding: 4rem 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
}

.initial-illustration i {
  font-size: 3.5rem;
  color: var(--text-dim);
  margin-bottom: 1rem;
}

.state-container h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

.state-container p {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.scanner-anim {
  width: 60px;
  height: 60px;
  margin: 0 auto 1.5rem;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  color: var(--primary);
}

/* KPI GRID */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.2rem;
  margin-bottom: 2rem;
}

.kpi-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.4rem;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: transform 0.2s ease;
}

.kpi-card:hover {
  transform: translateY(-3px);
}

.kpi-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
}

.accent-primary .kpi-icon { background: rgba(99, 102, 241, 0.15); color: var(--primary); }
.accent-blue .kpi-icon { background: rgba(14, 165, 233, 0.15); color: var(--accent-blue); }
.accent-green .kpi-icon { background: rgba(16, 185, 129, 0.15); color: var(--accent-green); }
.accent-gold .kpi-icon { background: rgba(245, 158, 11, 0.15); color: var(--accent-gold); }

.kpi-info {
  display: flex;
  flex-direction: column;
}

.kpi-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  color: var(--text-dim);
  font-weight: 700;
  letter-spacing: 0.5px;
}

.kpi-info h2 {
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
  font-family: var(--font-mono);
  margin: 2px 0;
}

.kpi-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* INSIGHTS CONTAINER */
.insights-container {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.chart-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.chart-header h3 {
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.chart-badge {
  font-size: 0.72rem;
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  padding: 3px 8px;
  border-radius: 12px;
  font-weight: 600;
}

.chart-canvas-wrapper {
  position: relative;
  height: 240px;
  width: 100%;
}

.market-summary-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
}

.market-summary-card h3 {
  font-size: 1.05rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-gold);
}

.verdict-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.verdict-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.82rem;
}

.badge-excellent { background: rgba(16, 185, 129, 0.2); color: #34d399; }
.badge-fair { background: rgba(14, 165, 233, 0.2); color: #38bdf8; }

/* TABS */
.tabs-nav {
  display: flex;
  gap: 10px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 1rem;
  margin-bottom: 1.8rem;
}

.tab-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.tab-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
}

.tab-btn.active {
  color: #fff;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid var(--border-focus);
}

.tab-btn .badge {
  background: var(--primary);
  color: #fff;
  font-size: 0.72rem;
  padding: 2px 7px;
  border-radius: 12px;
}

.tab-btn .badge-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* DEALS GRID (SUPER DEALS) */
.deals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.deal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.25s ease;
  position: relative;
}

.deal-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: 0 12px 30px -10px rgba(99, 102, 241, 0.3);
}

.deal-card.super-deal-highlight {
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.deal-card.super-deal-highlight::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #f59e0b, #ef4444);
}

.card-img-wrapper {
  height: 180px;
  background: #0f1422;
  position: relative;
  overflow: hidden;
}

.card-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.deal-card:hover .card-img-wrapper img {
  transform: scale(1.05);
}

.img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  font-size: 2.5rem;
}

.discount-tag {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #10b981;
  color: #fff;
  font-weight: 800;
  font-size: 0.78rem;
  padding: 4px 8px;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.discount-tag.super {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 2.8em;
  color: #fff;
}

.card-price-row {
  margin-bottom: 0.8rem;
}

.card-price {
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
  font-family: var(--font-mono);
}

.card-market-diff {
  font-size: 0.75rem;
  color: #34d399;
  font-weight: 600;
}

.card-meta {
  margin-top: auto;
  padding-top: 0.8rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-bottom: 0.8rem;
}

.card-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-card-action {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  text-decoration: none;
  padding: 8px;
  border-radius: var(--radius-sm);
  text-align: center;
  font-weight: 600;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-card-action:hover {
  background: var(--primary);
  color: #fff;
}

/* ALL ADS TABLE */
.table-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.table-toolbar .filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.table-toolbar select, .search-mini input {
  padding: 6px 12px;
  background: rgba(11, 15, 25, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  outline: none;
}

.ads-table-container {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow-x: auto;
}

.ads-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.88rem;
}

.ads-table th {
  background: rgba(255, 255, 255, 0.02);
  padding: 12px 16px;
  font-weight: 700;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
}

.ads-table td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  vertical-align: middle;
}

.ads-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.ad-table-title {
  font-weight: 600;
  color: #fff;
  max-width: 320px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ad-table-price {
  font-family: var(--font-mono);
  font-weight: 700;
  color: #fff;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
}

.status-super { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }
.status-good { background: rgba(16, 185, 129, 0.2); color: #34d399; }
.status-fair { background: rgba(148, 163, 184, 0.15); color: #cbd5e1; }
.status-high { background: rgba(239, 68, 68, 0.15); color: #f87171; }
.status-suspicious { background: rgba(217, 119, 6, 0.25); color: #f59e0b; }

/* EMPTY STATES */
.empty-tab-message {
  text-align: center;
  padding: 3.5rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.empty-tab-message i {
  font-size: 2.5rem;
  color: var(--accent-gold);
  margin-bottom: 1rem;
}

.empty-tab-message h4 {
  font-size: 1.1rem;
  margin-bottom: 0.4rem;
}

.empty-tab-message p {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* MODAL */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-content {
  background: var(--bg-dark);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 680px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 4px 8px;
}

.btn-close:hover {
  color: #fff;
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
}

.history-item {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-bottom: 0.8rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.history-item-info h4 {
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.history-item-info p {
  font-size: 0.78rem;
  color: var(--text-dim);
}

.history-item-stats {
  text-align: right;
}

.history-item-mean {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--accent-green);
  font-size: 1.05rem;
}

/* PLATFORM SWITCHER TABS IN HEADER */
.nav-platform-tabs {
  display: flex;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.platform-tab {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.88rem;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.platform-tab:hover {
  color: #fff;
}

.platform-tab.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 8px var(--primary-glow);
}

.badge-new {
  background: #f59e0b;
  color: #000;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 8px;
  text-transform: uppercase;
}

/* MERCADO LIVRE STYLES */
.ml-theme {
  border-color: rgba(245, 158, 11, 0.3);
  background: radial-gradient(circle at 80% 20%, rgba(245, 158, 11, 0.06) 0%, rgba(22, 29, 47, 0.8) 70%);
}

.btn-ml {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
}

.btn-ml:hover {
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.5);
}

.affiliate-settings-bar {
  background: rgba(11, 15, 25, 0.6);
  border: 1px dashed rgba(245, 158, 11, 0.35);
  border-radius: var(--radius-md);
  padding: 0.9rem 1.2rem;
  margin-bottom: 1.2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.affiliate-input-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-grow: 1;
}

.affiliate-input-group label {
  font-size: 0.82rem;
  font-weight: 700;
  color: #fcd34d;
  white-space: nowrap;
}

.affiliate-input-group input {
  padding: 6px 12px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  outline: none;
  min-width: 200px;
}

.affiliate-input-group input:focus {
  border-color: var(--accent-gold);
}

.affiliate-tip {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.ml-controls {
  grid-template-columns: 1.2fr 1fr auto;
}

.checkbox-wrapper {
  display: flex;
  align-items: center;
  height: 100%;
}

.custom-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
}

.custom-checkbox input[type="checkbox"] {
  accent-color: var(--accent-gold);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.ml-results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.8rem;
}

.ml-results-header h3 {
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
}

.badge-ml {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
  font-size: 0.82rem;
  padding: 4px 10px;
  border-radius: 12px;
  font-weight: 700;
}

/* ML CARD SPECIFICS */
.card-original-price {
  font-size: 0.82rem;
  color: var(--text-dim);
  text-decoration: line-through;
}

.full-tag {
  background: #ffe600;
  color: #000;
  font-weight: 900;
  font-style: italic;
  font-size: 0.72rem;
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.free-ship-tag {
  color: #34d399;
  font-size: 0.75rem;
  font-weight: 700;
}

.card-actions-ml {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 0.8rem;
}

.btn-whatsapp-copy {
  background: rgba(37, 211, 102, 0.15);
  color: #4ade80;
  border: 1px solid rgba(37, 211, 102, 0.3);
  padding: 8px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-whatsapp-copy:hover {
  background: #25D366;
  color: #000;
}

.btn-whatsapp-share {
  background: rgba(37, 211, 102, 0.25);
  color: #86efac;
  border: 1px solid rgba(37, 211, 102, 0.4);
  padding: 8px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-whatsapp-share:hover {
  background: #25D366;
  color: #000;
}

.btn-link-ml {
  grid-column: span 2;
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  border: 1px solid var(--border-subtle);
  padding: 6px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  text-decoration: none;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.btn-link-ml:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--primary);
}

/* COUPONS STYLES */
.add-coupon-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(245, 158, 11, 0.4);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-bottom: 1rem;
}

.add-coupon-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr 1fr auto;
  gap: 8px;
  align-items: center;
}

.add-coupon-grid input, .add-coupon-grid select {
  padding: 6px 10px;
  background: rgba(11, 15, 25, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 0.82rem;
  outline: none;
}

.coupon-item-row {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.coupon-badge-tag {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
  font-family: var(--font-mono);
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.85rem;
}

.coupon-card-badge {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(16, 185, 129, 0.05));
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.coupon-price-highlight {
  font-size: 1.45rem;
  font-weight: 900;
  color: #34d399;
  font-family: var(--font-mono);
}

/* VARIANTS AND FLIPPING STYLES */
.results-toolbar-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1.8rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem 1.4rem;
  flex-wrap: wrap;
}

.variants-bar-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-grow: 1;
}

.variants-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: #a5b4fc;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.variants-pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.variant-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.variant-pill:hover {
  background: rgba(99, 102, 241, 0.15);
  color: #fff;
  border-color: var(--primary);
}

.variant-pill.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 2px 8px var(--primary-glow);
}

.variant-pill .pill-count {
  background: rgba(0, 0, 0, 0.3);
  font-size: 0.72rem;
  padding: 1px 6px;
  border-radius: 10px;
}

/* FLIPPING / PROFIT BADGE */
.flipping-box {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(16, 185, 129, 0.04));
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  margin-top: 6px;
  margin-bottom: 8px;
  font-size: 0.78rem;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.flipping-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  color: #34d399;
}

.flipping-sub {
  font-size: 0.72rem;
  color: #94a3b8;
}

/* SCAM / RISK WARNING BADGE */
.scam-warning-box {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  margin-top: 6px;
  margin-bottom: 8px;
  font-size: 0.75rem;
  color: #f87171;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}

/* PRICE DROP BADGE */
.price-drop-badge {
  background: rgba(245, 158, 11, 0.2);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fbbf24;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
}

.variant-tag {
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}

.hidden {
  display: none !important;
}

@media (max-width: 768px) {
  .search-controls {
    grid-template-columns: 1fr;
  }
  .insights-container {
    grid-template-columns: 1fr;
  }
  .kpi-grid {
    grid-template-columns: 1fr 1fr;
  }
  .nav-platform-tabs {
    display: none;
  }
  .add-coupon-grid {
    grid-template-columns: 1fr;
  }
  .results-toolbar-top {
    flex-direction: column;
    align-items: flex-start;
  }
}

