@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

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

:root {
  --azul-escuro: #0a1628;
  --azul-medio: #0f2847;
  --azul-claro: #1e5faa;
  --azul-accent: #3b82f6;
  --azul-light: #60a5fa;
  --azul-glow: #93c5fd;
  --azul-bg: #f0f5ff;
  --cinza-100: #f1f5f9;
  --cinza-200: #e2e8f0;
  --cinza-300: #cbd5e1;
  --cinza-500: #64748b;
  --cinza-700: #334155;
  --cinza-900: #0f172a;
  --verde: #10b981;
  --amarelo: #f59e0b;
  --vermelho: #ef4444;
  --branco: #ffffff;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--azul-bg);
  color: var(--cinza-900);
  min-height: 100vh;
}

/* ==================== NAVBAR ==================== */
nav {
  background: var(--azul-escuro);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.nav-tabs {
  display: flex;
  align-items: center;
  gap: 0;
  height: 100%;
}

.nav-tab {
  padding: 0 20px;
  height: 100%;
  display: flex;
  align-items: center;
  color: var(--cinza-300);
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all 0.2s;
  white-space: nowrap;
  user-select: none;
  text-decoration: none;
}

.nav-tab:hover { color: var(--branco); background: rgba(255,255,255,0.05); }
.nav-tab.active { color: var(--azul-light); border-bottom-color: var(--azul-accent); background: rgba(59,130,246,0.08); }

.nav-right {
  display: flex;
  align-items: center;
  gap: 0;
  height: 100%;
  margin-left: auto;
}

.nav-tab-conta {
  border-left: 1px solid rgba(255,255,255,0.1);
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-right: 12px;
}

.nav-user-info {
  text-align: right;
  color: var(--cinza-300);
  font-size: 0.78rem;
  line-height: 1.3;
}

.nav-user-name { color: var(--branco); font-weight: 600; }

.nav-btn {
  padding: 6px 16px;
  border: 1px solid var(--azul-accent);
  background: transparent;
  color: var(--azul-light);
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  transition: all 0.2s;
}

.nav-btn:hover { background: var(--azul-accent); color: var(--branco); }
.nav-btn-solid { background: var(--azul-accent); color: var(--branco); border-color: var(--azul-accent); }
.nav-btn-solid:hover { background: var(--azul-claro); }

/* ==================== PAGES ==================== */
.page { display: none; }
.page.active { display: block; }

/* ==================== HOME ==================== */
.hero {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 50%, #f1f3f5 100%);
  text-align: center;
  padding: 50px 24px 40px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(ellipse at center, rgba(59,130,246,0.06) 0%, transparent 70%);
  animation: pulse 6s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.1); }
}

.hero-content { position: relative; z-index: 1; }

.hero-logo {
  width: 70px;
  height: 70px;
  margin: 0 auto 16px;
  background: var(--azul-accent);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: white;
  box-shadow: 0 4px 20px rgba(59,130,246,0.4);
}

.hero-logo-img {
  width: 160px;
  height: auto;
  margin: 0 auto 16px;
  display: block;
  object-fit: contain;
}

.hero-sub {
  color: var(--cinza-500);
  font-size: 1.1rem;
  font-weight: 300;
  margin-bottom: 6px;
}

.hero-title {
  font-size: 3rem;
  font-weight: 900;
  color: var(--cinza-900);
  margin-bottom: 10px;
  letter-spacing: -1px;
}

.hero-title span {
  background: linear-gradient(135deg, #2563eb, #3b82f6, #60a5fa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  color: var(--cinza-500);
  font-size: 0.95rem;
  max-width: 500px;
  margin: 0 auto;
}

/* Filtros HOME */
.home-filters {
  max-width: 900px;
  margin: -30px auto 0;
  background: var(--branco);
  border-radius: 16px;
  padding: 28px 32px;
  box-shadow: 0 4px 30px rgba(0,0,0,0.08);
  position: relative;
  z-index: 2;
}

.filter-section {
  margin-bottom: 20px;
}

.filter-label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--cinza-700);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-label-icon {
  width: 24px;
  height: 24px;
  background: var(--azul-accent);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.75rem;
}

/* Price slider */
.price-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.price-value {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--azul-accent);
  min-width: 100px;
  text-align: center;
  background: var(--azul-bg);
  padding: 6px 12px;
  border-radius: 8px;
}

.slider-wrap {
  flex: 1;
  position: relative;
  height: 36px;
}

.slider-wrap input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  position: absolute;
  width: 100%;
  height: 6px;
  background: transparent;
  pointer-events: none;
  top: 15px;
}

.slider-wrap input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  background: var(--azul-accent);
  border-radius: 50%;
  cursor: pointer;
  pointer-events: all;
  border: 3px solid var(--branco);
  box-shadow: 0 2px 8px rgba(59,130,246,0.4);
}

.slider-track {
  position: absolute;
  top: 18px;
  left: 0; right: 0;
  height: 6px;
  background: var(--cinza-200);
  border-radius: 3px;
}

.slider-track-active {
  position: absolute;
  top: 18px;
  height: 6px;
  background: linear-gradient(90deg, var(--azul-accent), var(--azul-light));
  border-radius: 3px;
}

/* Tags */
.tags-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.tag-btn {
  padding: 8px 20px;
  border: 2px solid var(--cinza-200);
  background: var(--branco);
  color: var(--cinza-500);
  border-radius: 25px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.2s;
  user-select: none;
}

.tag-btn:hover { border-color: var(--azul-accent); color: var(--azul-accent); }
.tag-btn.active { background: var(--azul-accent); color: var(--branco); border-color: var(--azul-accent); }

/* Sort */
.sort-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 24px;
  max-width: 900px;
  margin: 20px auto 10px;
}

.sort-row label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--cinza-500);
}

.sort-row select {
  padding: 6px 12px;
  border: 2px solid var(--cinza-200);
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--cinza-700);
  background: var(--branco);
  cursor: pointer;
  outline: none;
}

.sort-row select:focus { border-color: var(--azul-accent); }

/* PC Cards */
.pc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
  padding: 10px 24px 40px;
  max-width: 1400px;
  margin: 0 auto;
}

.pc-card {
  background: var(--branco);
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
  border: 1px solid var(--cinza-200);
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.pc-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(59,130,246,0.12);
  border-color: var(--azul-accent);
}

.pc-card-img-wrap {
  position: relative;
  background: var(--cinza-100);
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}

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

.pc-card-badge {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: var(--verde);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pc-card-body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.pc-card-nome {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--cinza-900);
  margin-bottom: 8px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 3.4em;
}

.pc-card-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  font-size: 0.7rem;
  color: var(--cinza-500);
  margin-bottom: 12px;
}

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

.spec-icon {
  width: 16px;
  height: 16px;
  background: rgba(59,130,246,0.15);
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.55rem;
  color: var(--azul-light);
  font-weight: 700;
  flex-shrink: 0;
}

.pc-card-preco-area {
  margin-top: auto;
}

.pc-card-preco-old {
  font-size: 0.75rem;
  color: #ef4444;
  text-decoration: line-through;
  margin-bottom: 2px;
}

.pc-card-preco {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--verde);
  line-height: 1.2;
}

.pc-card-preco-pix {
  font-size: 0.68rem;
  color: var(--verde);
  margin-top: 2px;
  font-weight: 500;
}

.pc-card-divider {
  border: none;
  border-top: 1px solid var(--cinza-200);
  margin: 10px 0;
}

.pc-card-preco-card {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--verde);
  margin-bottom: 2px;
}

.pc-card-parcelas {
  font-size: 0.72rem;
  color: var(--cinza-500);
  margin-bottom: 2px;
}

.pc-card-parcelas-info {
  font-size: 0.68rem;
  color: var(--cinza-500);
  margin-bottom: 10px;
}

.btn-ver {
  width: 100%;
  padding: 10px 16px;
  background: var(--azul-accent);
  color: var(--branco);
  border: none;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  text-align: center;
}

.btn-ver:hover {
  background: var(--azul-claro);
  transform: scale(1.02);
}

/* ==================== DATABASE TABLES ==================== */
.db-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 30px 24px;
}

.db-header {
  margin-bottom: 24px;
}

.db-header h2 {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--cinza-900);
  margin-bottom: 6px;
}

.db-header p {
  color: var(--cinza-500);
  font-size: 0.95rem;
}

.db-filters {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  align-items: center;
}

.db-filter-btn {
  padding: 6px 18px;
  border: 2px solid var(--cinza-200);
  background: var(--branco);
  color: var(--cinza-500);
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  transition: all 0.2s;
}

.db-filter-btn:hover { border-color: var(--azul-accent); color: var(--azul-accent); }
.db-filter-btn.active { background: var(--azul-accent); color: var(--branco); border-color: var(--azul-accent); }

.db-table {
  width: 100%;
  background: var(--branco);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  border-collapse: collapse;
}

.db-table th {
  background: var(--azul-escuro);
  color: var(--branco);
  padding: 12px 16px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: left;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.db-table th:hover { background: var(--azul-medio); }

.db-table td {
  padding: 12px 16px;
  font-size: 0.85rem;
  border-bottom: 1px solid var(--cinza-100);
  color: var(--cinza-700);
}

.db-table tr:hover td { background: var(--azul-bg); }

.db-table .preco { color: var(--verde); font-weight: 700; }
.db-table .score { color: var(--azul-accent); font-weight: 700; }

.benchmark-bar {
  width: 80px;
  height: 8px;
  background: var(--cinza-200);
  border-radius: 4px;
  overflow: hidden;
  display: inline-block;
  vertical-align: middle;
  margin-left: 6px;
}

.benchmark-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--azul-accent), var(--verde));
  border-radius: 4px;
}

/* ==================== BUSCADOR ==================== */
.buscador-page { padding: 30px 24px; max-width: 1600px; margin: 0 auto; }

.buscador-header {
  text-align: center;
  margin-bottom: 24px;
}

.buscador-header h2 {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--cinza-900);
}

.buscador-header p { color: var(--cinza-500); }

.buscador-bar {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.buscador-bar input[type="text"] {
  width: 100%;
  max-width: 500px;
  padding: 14px 18px;
  font-size: 1rem;
  border: 2px solid var(--cinza-200);
  border-radius: 10px;
  outline: none;
  transition: border 0.2s;
  font-family: 'Inter', sans-serif;
}

.buscador-bar input:focus { border-color: var(--azul-accent); }

.buscador-bar button {
  padding: 14px 28px;
  background: var(--azul-accent);
  color: white;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s;
  font-family: 'Inter', sans-serif;
}

.buscador-bar button:hover { background: var(--azul-claro); }
.buscador-bar button:disabled { background: var(--cinza-300); cursor: not-allowed; }

.buscador-filtros {
  display: flex;
  justify-content: center;
  gap: 16px;
  padding: 8px 0;
  flex-wrap: wrap;
  align-items: center;
}

.buscador-filtros label {
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  color: var(--cinza-700);
  font-weight: 500;
}

.buscador-price {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  padding: 8px 0 20px;
  flex-wrap: wrap;
}

.buscador-price label { font-size: 0.85rem; font-weight: 700; color: var(--cinza-500); }

.buscador-price input[type="number"] {
  width: 110px;
  padding: 8px 10px;
  font-size: 0.9rem;
  border: 2px solid var(--cinza-200);
  border-radius: 8px;
  outline: none;
  text-align: right;
  font-family: 'Inter', sans-serif;
}

.buscador-price input:focus { border-color: var(--azul-accent); }
.buscador-price span { color: var(--cinza-300); }

.buscador-price .range-wrap {
  position: relative;
  width: 250px;
  height: 30px;
}

.buscador-price .range-wrap input[type="range"] {
  -webkit-appearance: none;
  position: absolute;
  width: 100%;
  height: 6px;
  background: transparent;
  pointer-events: none;
  top: 12px;
}

.buscador-price .range-wrap input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  background: var(--azul-accent);
  border-radius: 50%;
  cursor: pointer;
  pointer-events: all;
  border: 3px solid white;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.buscador-price .r-track {
  position: absolute;
  top: 15px;
  left: 0; right: 0;
  height: 6px;
  background: var(--cinza-200);
  border-radius: 3px;
}

.buscador-price .r-active {
  position: absolute;
  top: 15px;
  height: 6px;
  background: var(--azul-accent);
  border-radius: 3px;
}

.btn-buscar-filtro {
  padding: 8px 18px;
  background: var(--verde);
  color: white;
  font-size: 0.85rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
}

.btn-buscar-filtro:hover { background: #059669; }

.buscador-stats {
  text-align: center;
  padding: 8px;
  font-size: 0.85rem;
  color: var(--cinza-500);
}

.buscador-loading {
  text-align: center;
  padding: 40px;
  font-size: 1rem;
  color: var(--azul-accent);
  display: none;
}

.resultados-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

@media (max-width: 1100px) { .resultados-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 700px) { .resultados-grid { grid-template-columns: 1fr; } }

.col h3 {
  font-size: 1rem;
  margin-bottom: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}

.col-ml h3 { background: #fef9c3; color: #854d0e; border-left: 4px solid #eab308; }
.col-olx h3 { background: #f3e8ff; color: #6b21a8; border-left: 4px solid #9333ea; }
.col-amazon h3 { background: #e0f2fe; color: #0369a1; border-left: 4px solid #38bdf8; }
.col-shopee h3 { background: #fff7ed; color: #9a3412; border-left: 4px solid #f97316; }
.col-enjoei h3 { background: #fce4ec; color: #7f1d1d; border-left: 4px solid #9f1239; }
.col-facebook h3 { background: #dbeafe; color: #1e3a8a; border-left: 4px solid #1d4ed8; }

.result-card {
  background: var(--branco);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 10px;
  display: flex;
  gap: 12px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.06);
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s, box-shadow 0.15s;
}

.result-card:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,0.1); }

.result-card img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  border-radius: 8px;
  background: var(--cinza-100);
  flex-shrink: 0;
}

.result-info { flex: 1; min-width: 0; }

.result-titulo {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.result-preco {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--verde);
}

.result-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

.badge {
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
}

.badge-frete { background: #d1fae5; color: #065f46; }
.badge-novo { background: #dbeafe; color: #1e40af; }
.badge-usado { background: #fef3c7; color: #92400e; }

.sem-resultados {
  text-align: center;
  padding: 30px;
  color: var(--cinza-300);
}

.erro-msg {
  background: #fee2e2;
  color: #991b1b;
  border-radius: 8px;
  padding: 12px;
  font-size: 0.9rem;
}

/* ==================== MINHA CONTA ==================== */
.conta-page { max-width: 700px; margin: 0 auto; padding: 30px 24px; }

.conta-section {
  background: var(--branco);
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.conta-section h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--cinza-900);
}

.plano-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.plano-item {
  border: 2px solid var(--cinza-200);
  border-radius: 10px;
  padding: 14px;
  position: relative;
  transition: all 0.2s;
}

.plano-item.ativo { border-color: var(--azul-accent); background: var(--azul-bg); }

.plano-nome { font-weight: 700; font-size: 1rem; }
.plano-preco { font-size: 1.2rem; font-weight: 800; color: var(--azul-accent); margin: 4px 0; }
.plano-desc { font-size: 0.8rem; color: var(--cinza-500); }

.badge-plano-atual {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--azul-accent);
  color: white;
  font-size: 0.7rem;
  padding: 2px 10px;
  border-radius: 10px;
  font-weight: 700;
}

.btn-full {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 10px;
  font-family: 'Inter', sans-serif;
}

.btn-azul { background: var(--azul-accent); color: white; }
.btn-azul:hover { background: var(--azul-claro); }
.btn-roxo { background: #7c3aed; color: white; }
.btn-roxo:hover { background: #6d28d9; }
.btn-vermelho-outline { background: transparent; color: var(--vermelho); border: 1px solid var(--vermelho); }
.btn-vermelho-outline:hover { background: #fef2f2; }

.hist-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--cinza-100);
  font-size: 0.85rem;
}

.hist-item:last-child { border-bottom: none; }
.hist-produto { font-weight: 600; }
.hist-meta { color: var(--cinza-300); font-size: 0.75rem; text-align: right; }

/* ==================== AUTH MODAL ==================== */
.modal-bg {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  justify-content: center;
  align-items: center;
}

.modal-bg.active { display: flex; }

.modal-box {
  background: var(--branco);
  border-radius: 16px;
  padding: 36px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.modal-box h2 { font-size: 1.4rem; text-align: center; margin-bottom: 6px; }
.modal-box .sub { text-align: center; color: var(--cinza-500); font-size: 0.9rem; margin-bottom: 20px; }

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 0.82rem; font-weight: 600; margin-bottom: 4px; color: var(--cinza-500); }

.field input {
  width: 100%;
  padding: 10px 14px;
  border: 2px solid var(--cinza-200);
  border-radius: 8px;
  font-size: 0.95rem;
  outline: none;
  font-family: 'Inter', sans-serif;
  transition: border 0.2s;
}

.field input:focus { border-color: var(--azul-accent); }

.auth-err {
  background: #fee2e2;
  color: #991b1b;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 0.82rem;
  margin-bottom: 12px;
  display: none;
}

.auth-link {
  text-align: center;
  margin-top: 16px;
  font-size: 0.82rem;
  color: var(--cinza-500);
}

.auth-link a { color: var(--azul-accent); cursor: pointer; text-decoration: underline; }

/* Limite banner */
.limite-bar {
  background: linear-gradient(90deg, #fef3c7, #fde68a);
  color: #92400e;
  text-align: center;
  padding: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  display: none;
}

.limite-bar a { color: var(--azul-accent); cursor: pointer; text-decoration: underline; }

/* login prompt */
.login-cta {
  text-align: center;
  padding: 80px 20px;
}

.login-cta h2 { font-size: 1.6rem; color: var(--cinza-900); margin-bottom: 10px; }
.login-cta p { color: var(--cinza-500); margin-bottom: 20px; }

/* ==================== DETAIL PAGE ==================== */
.detail-hero {
  display: flex; gap: 30px; margin-bottom: 30px;
}
.detail-img-area {
  flex-shrink: 0; width: 300px;
}
.detail-img-main {
  width: 300px; height: 220px; object-fit: cover; border-radius: 12px;
  background: var(--cinza-200); display: block;
}
.detail-img-thumbs {
  display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap;
}
.detail-img-thumbs img {
  width: 56px; height: 42px; object-fit: cover; border-radius: 6px;
  cursor: pointer; border: 2px solid transparent; transition: 0.2s;
}
.detail-img-thumbs img:hover, .detail-img-thumbs img.active {
  border-color: var(--azul-accent);
}
.detail-info { flex: 1; }
.detail-info h1 { font-size: 1.6rem; font-weight: 800; color: var(--cinza-900); margin-bottom: 8px; }
.detail-price { font-size: 1.8rem; font-weight: 700; color: var(--azul-accent); margin-bottom: 12px; }
.detail-badge {
  display: inline-block; padding: 4px 10px; border-radius: 20px;
  font-size: 0.75rem; font-weight: 700; margin-right: 6px; margin-bottom: 8px;
}
.detail-badge-green { background: #d1fae5; color: #065f46; }
.detail-badge-blue { background: #dbeafe; color: #1e40af; }
.detail-badge-purple { background: #ede9fe; color: #5b21b6; }
.detail-desc { color: var(--cinza-500); font-size: 0.95rem; line-height: 1.6; margin: 12px 0; }
.detail-affiliate {
  display: inline-block; background: linear-gradient(135deg, var(--azul-accent), var(--azul-claro));
  color: #fff; padding: 10px 24px; border-radius: 8px; text-decoration: none;
  font-weight: 700; font-size: 0.95rem; margin-top: 8px;
}
.detail-affiliate:hover { opacity: 0.9; }

/* Spec Card detail layout (GPU/CPU) */
.detail-header-card {
  background: var(--branco); border: 1px solid var(--cinza-200); border-radius: 12px;
  padding: 24px; margin-bottom: 16px; box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.detail-header-card h1 { font-size: 1.6rem; font-weight: 800; color: var(--cinza-900); margin-bottom: 4px; }
.detail-header-card p { font-size: 0.9rem; color: var(--cinza-500); font-weight: 500; }

/* 4-column spec grid */
.d-spec-grid {
  display: grid !important; grid-template-columns: repeat(4, 1fr) !important;
  gap: 12px; margin-bottom: 16px; align-items: start;
}
@media (max-width: 1100px) { .d-spec-grid { grid-template-columns: repeat(2, 1fr) !important; } }
@media (max-width: 600px) { .d-spec-grid { grid-template-columns: 1fr !important; } }

.d-spec-card {
  background: var(--branco); border: 1px solid var(--cinza-200); border-radius: 10px;
  overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.04); min-width: 0;
}
.d-spec-header {
  padding: 12px 14px; cursor: pointer; display: flex; justify-content: space-between;
  align-items: center; user-select: none; transition: background 0.15s;
}
.d-spec-header:hover { background: var(--cinza-100); }
.d-spec-title { font-size: 0.85rem; font-weight: 700; color: var(--cinza-900); }
.d-spec-toggle { font-size: 0.65rem; color: var(--cinza-500); transition: transform 0.3s; }
.d-spec-toggle.open { transform: rotate(180deg); }
.d-spec-divider { height: 2px; background: linear-gradient(90deg, var(--azul-accent), var(--azul-light)); margin: 0 14px; }
.d-spec-body { padding: 6px 14px 12px; }
.d-spec-body.collapsed { display: none; }
.d-spec-row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 7px 0; border-bottom: 1px solid var(--cinza-100); gap: 8px;
}
.d-spec-row:last-child { border-bottom: none; }
.d-spec-label { font-size: 0.75rem; color: var(--cinza-500); font-weight: 500; white-space: nowrap; }
.d-spec-val { font-size: 0.75rem; color: var(--cinza-900); font-weight: 600; text-align: right; word-break: break-word; }
.d-spec-val.hl { color: var(--azul-accent); }

/* Benchmark bars */
.d-bench-card {
  background: var(--branco); border: 1px solid var(--cinza-200); border-radius: 12px;
  padding: 20px 24px; margin-bottom: 16px; box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.d-bench-card h3 { font-size: 1rem; font-weight: 700; color: var(--cinza-900); margin-bottom: 16px; }
.d-bench-item { margin-bottom: 14px; }
.d-bench-item:last-child { margin-bottom: 0; }
.d-bench-lbl { display: flex; justify-content: space-between; font-size: 0.8rem; color: var(--cinza-500); font-weight: 500; margin-bottom: 6px; }
.d-bench-score { color: var(--cinza-900); font-weight: 700; }
.d-bench-bar { width: 100%; height: 8px; background: var(--cinza-100); border-radius: 4px; overflow: hidden; }
.d-bench-fill { height: 100%; background: linear-gradient(90deg, var(--azul-accent), var(--azul-light)); border-radius: 4px; transition: width 0.6s ease; }

/* Legacy specs grid (for PCs) */
.detail-specs {
  background: var(--branco); border-radius: 12px; padding: 24px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.04); margin-bottom: 24px;
}
.detail-specs h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 16px; color: var(--cinza-900); }
.specs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.spec-item {
  padding: 10px 14px; background: var(--cinza-100); border-radius: 8px;
}
.spec-item .spec-label { font-size: 0.72rem; text-transform: uppercase; font-weight: 700; color: var(--cinza-500); }
.spec-item .spec-value { font-size: 0.95rem; font-weight: 600; color: var(--cinza-900); margin-top: 2px; }

.detail-chart-section {
  background: var(--branco); border: 1px solid var(--cinza-200); border-radius: 12px; padding: 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04); margin-bottom: 16px;
}
.detail-chart-section h3 { font-size: 1rem; font-weight: 700; margin-bottom: 16px; }
.detail-chart-section canvas { max-height: 280px; }

.detail-search-section {
  background: var(--branco); border: 1px solid var(--cinza-200); border-radius: 12px; padding: 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04); margin-bottom: 16px;
}
.detail-search-section h3 { font-size: 1rem; font-weight: 700; margin-bottom: 12px; }
.detail-search-btn {
  background: linear-gradient(135deg, var(--azul-accent), var(--azul-claro)); color: #fff;
  border: none; padding: 14px 28px; border-radius: 10px; font-weight: 700;
  font-size: 0.95rem; cursor: pointer; display: flex; align-items: center; gap: 8px;
  width: 100%; justify-content: center; font-family: 'Inter', sans-serif;
}
.detail-search-btn:hover { opacity: 0.9; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(59,130,246,0.3); }
.detail-search-results { margin-top: 16px; }
.detail-search-results .result-cols { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }

.db-table tr { cursor: pointer; }
.db-table tr:hover { background: rgba(59,130,246,0.05); }

/* ==================== RESPONSIVE — TABLET ==================== */
@media (max-width: 1024px) {
  .pc-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
  .d-spec-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .detail-hero { flex-direction: column; }
  .detail-img-area { width: 100%; }
  .detail-img-main { width: 100%; height: auto; max-height: 300px; }
  .db-page { padding: 24px 16px; }
  .conta-page { padding: 24px 16px; }
}

/* ==================== RESPONSIVE — MOBILE ==================== */
@media (max-width: 768px) {
  /* Nav */
  nav { padding: 0 8px; height: 56px; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .nav-tabs { gap: 0; overflow-x: auto; flex-shrink: 1; min-width: 0; }
  .nav-tab { padding: 0 10px; font-size: 0.7rem; white-space: nowrap; }
  .nav-right { flex-shrink: 0; }
  .nav-user { padding-right: 6px; }
  .nav-user-info { font-size: 0.7rem; }

  /* Hero */
  .hero { padding: 36px 16px 32px; }
  .hero-logo-img { width: 120px; }
  .hero-sub { font-size: 0.9rem; }
  .hero-title { font-size: 2rem; }
  .hero-desc { font-size: 0.85rem; }
  .home-filters { margin: -20px 12px 0; padding: 18px 16px; border-radius: 12px; }

  /* Price slider */
  .price-row { flex-direction: column; gap: 8px; }
  .price-value { min-width: auto; }

  /* Tags */
  .tags-row { gap: 6px; }
  .tag-btn { padding: 6px 14px; font-size: 0.78rem; }

  /* Sort */
  .sort-row { padding: 0 12px; flex-direction: column; gap: 8px; align-items: flex-start; }

  /* PC grid */
  .pc-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 10px 12px 30px; }
  .pc-card-img { height: 140px; }
  .pc-card-img-wrap { min-height: 160px; padding: 10px; }
  .pc-card-body { padding: 10px 12px 12px; }
  .pc-card-nome { font-size: 0.8rem; min-height: 2.6em; }
  .pc-card-preco { font-size: 1.15rem; }

  /* Database pages */
  .db-page { padding: 20px 12px; }
  .db-header h2 { font-size: 1.3rem; }
  .db-filters { gap: 8px; }
  .db-filter-btn { padding: 5px 12px; font-size: 0.75rem; }
  .db-table { font-size: 0.75rem; display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .db-table th, .db-table td { padding: 8px 10px; font-size: 0.75rem; }

  /* Buscador */
  .buscador-page { padding: 16px 12px; }
  .buscador-header h2 { font-size: 1.3rem; }
  .buscador-bar { flex-direction: column; align-items: stretch; }
  .buscador-bar input[type="text"] { max-width: 100%; }
  .buscador-bar button { width: 100%; }
  .buscador-filtros { gap: 8px; }
  .buscador-price { flex-direction: column; gap: 8px; }
  .buscador-price .range-wrap { width: 100%; }
  .resultados-grid { grid-template-columns: 1fr; gap: 12px; }

  /* Result cards */
  .result-card { padding: 10px; gap: 10px; }
  .result-card img { width: 64px; height: 64px; }
  .result-titulo { font-size: 0.8rem; }
  .result-preco { font-size: 1rem; }

  /* Detail page */
  .detail-info h1 { font-size: 1.2rem; }
  .detail-price { font-size: 1.4rem; }
  .d-spec-grid { grid-template-columns: 1fr !important; }
  .detail-specs { padding: 16px; }
  .specs-grid { grid-template-columns: 1fr 1fr; gap: 8px; }

  /* Compare */
  #cmpTable th, #cmpTable td { padding: 6px 8px; font-size: 0.72rem; }
  #cmpTable .label-col { min-width: 120px; font-size: 0.7rem; }
  #cmpTable .product-header { min-width: 140px; max-width: 160px; padding: 10px 8px; }

  /* Conta */
  .conta-page { padding: 20px 12px; }
  .conta-section { padding: 18px 16px; }
  .modal-box { margin: 16px; padding: 24px 20px; }

  /* Charts */
  .detail-chart-section { padding: 16px; }
  .detail-chart-section canvas { max-height: 200px; }
  .detail-search-section { padding: 16px; }
}

/* ==================== RESPONSIVE — SMALL MOBILE ==================== */
@media (max-width: 480px) {
  .pc-grid { grid-template-columns: 1fr; }
  .hero-title { font-size: 1.7rem; }
  .hero-logo-img { width: 100px; }
  .nav-tab { padding: 0 8px; font-size: 0.65rem; }
  .specs-grid { grid-template-columns: 1fr; }
  .detail-search-results .result-cols { grid-template-columns: 1fr; }
}

/* ===== COMPARE TABLE ===== */
#cmpTable th, #cmpTable td { padding: 10px 14px; text-align: center; font-size: 0.82rem; border-bottom: 1px solid var(--cinza-100); white-space: nowrap; }
#cmpTable th { background: var(--branco); position: sticky; top: 60px; z-index: 10; }
#cmpTable .label-col { text-align: left; font-weight: 600; color: var(--cinza-500); background: var(--cinza-100); position: sticky; left: 0; z-index: 5; min-width: 160px; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.3px; }
#cmpTable .section-row td { background: var(--azul-accent); color: #fff; font-weight: 700; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.5px; padding: 8px 14px; }
#cmpTable .product-header { background: var(--branco); padding: 14px 10px; vertical-align: top; min-width: 180px; max-width: 220px; border: 1px solid var(--cinza-200); border-radius: 10px 10px 0 0; }
.cmp-product-name { font-size: 0.85rem; font-weight: 700; color: var(--cinza-900); margin-bottom: 6px; line-height: 1.3; white-space: normal; }
.cmp-product-price { font-size: 0.9rem; font-weight: 700; color: var(--verde); margin-bottom: 8px; }
.cmp-remove-btn { padding: 4px 10px; background: var(--vermelho); color: #fff; border: none; border-radius: 6px; font-size: 0.7rem; font-weight: 600; cursor: pointer; font-family: 'Inter', sans-serif; }
.cmp-remove-btn:hover { opacity: 0.8; }
.cmp-search-btn { display: block; margin-top: 6px; padding: 6px 10px; background: var(--azul-accent); color: #fff; border: none; border-radius: 6px; font-size: 0.7rem; font-weight: 600; cursor: pointer; font-family: 'Inter', sans-serif; width: 100%; }
.cell-best { background: #d1fae5; color: #065f46; font-weight: 600; }
.cell-good { background: #d9f99d; color: #365314; font-weight: 600; }
.cell-mid { background: #fef9c3; color: #713f12; font-weight: 600; }
.cell-bad { background: #fed7aa; color: #9a3412; font-weight: 600; }
.cell-worst { background: #fecaca; color: #991b1b; font-weight: 600; }
.cell-na { color: var(--cinza-300); }
#cmpSearchInput:focus { outline: none; border-color: var(--azul-accent); box-shadow: 0 0 0 3px rgba(59,130,246,0.1); }
.cmp-search-item { padding: 10px 16px; cursor: pointer; font-size: 0.85rem; border-bottom: 1px solid var(--cinza-100); display: flex; justify-content: space-between; align-items: center; }
.cmp-search-item:hover { background: var(--cinza-100); }
/* Google login */
.google-divider { display:flex; align-items:center; gap:10px; margin:14px 0 10px; color:var(--cinza-400); font-size:0.8rem; }
.google-divider::before, .google-divider::after { content:""; flex:1; height:1px; background:var(--cinza-200); }
.btn-google { display:flex; align-items:center; justify-content:center; gap:10px; width:100%; padding:10px; border:1px solid var(--cinza-200); border-radius:8px; background:#fff; cursor:pointer; font-size:0.9rem; color:var(--cinza-700); transition:background 0.2s; }
.btn-google:hover { background:var(--cinza-50); }
.btn-google svg { width:18px; height:18px; }
