/* ══════════════════════════════════════════════
   Valor Clássico - Estilos MVP
   Tokens de cor e tipografia conforme UX Spec
   ══════════════════════════════════════════════ */

/* ── Tokens ───────────────────────────────── */
:root {
  --vc-accent:        #C4862A;
  --vc-accent-strong: #A36A18;
  --vc-ink:           #1A1A1A;
  --vc-ink-soft:      #3A3A3A;
  --vc-ink-muted:     #7A6E5F;
  --vc-surface:       #F4F1EC;
  --vc-surface-warm:  #EDE8E0;
  --vc-surface-dark:  #000a05;
  --vc-border:        #D4CEBF;
  --vc-white:         #FDFAF6;

  --radius: 6px;
  --radius-lg: 12px;
  --shadow-card: 0 4px 24px rgba(0,0,0,.10);
  --transition: 180ms ease;
}

/* ── Reset & base ─────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Source Sans 3', system-ui, sans-serif;
  color: var(--vc-ink);
  background: var(--vc-surface);
  line-height: 1.6;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

/* ── Typography helpers ───────────────────── */
.teko { font-family: 'Teko', sans-serif; }

/* ── Layout helpers ───────────────────────── */
.container {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: 24px;
}

.hidden { display: none !important; }

.field-error {
  display: block;
  font-size: 11px;
  color: #C0392B;
  margin-top: 4px;
  font-weight: 600;
  letter-spacing: .2px;
}

/* ══════════════════════════════════════════════
   HEADER
   ══════════════════════════════════════════════ */
#top-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--vc-white);
  border-bottom: 2px solid var(--vc-accent);
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  max-width: 1120px;
  margin-inline: auto;
  padding: 12px 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.logo-img {
  height: 40px;
  width: auto;
  display: block;
}

.logo-vc {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--vc-accent);
  color: var(--vc-ink);
  font-family: 'Teko', sans-serif;
  font-size: 18px;
  font-weight: 700;
  border-radius: 6px;
  letter-spacing: .5px;
}

.logo-text {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--vc-white);
  letter-spacing: .3px;
}

.header-nav {
  display: flex;
  gap: 24px;
  margin-left: auto;
}

.header-nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--vc-ink-soft);
  transition: color var(--transition);
}

.header-nav a:hover { color: var(--vc-accent); }

/* ══════════════════════════════════════════════
   BUTTONS
   ══════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  font-family: 'Teko', sans-serif;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: .8px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), opacity var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--vc-accent);
  color: var(--vc-ink);
}
.btn-primary:hover { background: var(--vc-accent-strong); }
.btn-primary:disabled { opacity: .45; cursor: not-allowed; }

.btn-ghost {
  background: transparent;
  color: rgba(255,255,255,.6);
  border: 1px solid rgba(255,255,255,.2);
}
.btn-ghost:hover { border-color: rgba(255,255,255,.5); color: var(--vc-white); }

.btn-outline {
  background: transparent;
  color: var(--vc-accent);
  border: 1px solid var(--vc-accent);
}
.btn-outline:hover { background: var(--vc-accent); color: var(--vc-ink); }

.btn-sm { padding: 8px 16px; font-size: 14px; }

/* ══════════════════════════════════════════════
   HERO
   ══════════════════════════════════════════════ */
#hero-search {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.72' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='.045'/%3E%3C/svg%3E"),
    linear-gradient(160deg, #000a05 0%, #000603 55%, #000200 100%);
  padding: 56px 24px 72px;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 30%, rgba(196,134,42,.09) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 760px;
  text-align: center;
}

.hero-eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--vc-accent);
  margin-bottom: 16px;
}

.hero-headline {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(26px, 3.8vw, 44px);
  font-weight: 700;
  line-height: 1.2;
  color: var(--vc-white);
  margin-bottom: 20px;
  letter-spacing: -.3px;
}

.hero-headline em {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  color: var(--vc-accent);
  font-weight: 400;
}

.hero-sub {
  font-size: 16px;
  color: rgba(255,255,255,.7);
  margin-bottom: 40px;
  max-width: 560px;
  margin-inline: auto;
}

/* ── Search Card ──────────────────────────── */
.search-card {
  background: rgba(253,250,246,.07);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(196,134,42,.28);
  border-radius: var(--radius-lg);
  padding: 32px 28px 24px;
  text-align: left;
}

.search-row {
  display: grid;
  /* Marca, modelo, versão e ano: a versão é o rótulo mais longo (specs
     inteiras vindas das fontes), por isso ganha mais espaço que os outros. */
  grid-template-columns: 1fr 1fr 1.4fr auto;
  gap: 16px;
  margin-bottom: 20px;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-group label {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(253,250,246,.6);
}

.field-group input,
.field-group select {
  height: 48px;
  padding: 0 16px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--radius);
  color: var(--vc-white);
  font-size: 15px;
  font-family: 'Inter', sans-serif;
  transition: border-color var(--transition), background var(--transition);
  -webkit-appearance: none;
}

.field-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='rgba(255,255,255,.5)' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.field-group select option {
  color: var(--vc-ink);
  background: var(--vc-white);
}

.field-group input:focus,
.field-group select:focus {
  outline: none;
  border-color: var(--vc-accent);
  background: rgba(253,250,246,.14);
}

.field-group input::placeholder { color: rgba(255,255,255,.3); }

.field-group input:disabled,
.field-group select:disabled {
  opacity: .4;
  cursor: not-allowed;
}

.field-group--ano { min-width: 110px; }

.search-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.search-trust {
  font-size: 12px;
  color: rgba(255,255,255,.4);
  text-align: center;
  letter-spacing: .3px;
}

/* ══════════════════════════════════════════════
   RESULTADO
   ══════════════════════════════════════════════ */
.result-section {
  background: var(--vc-surface);
  padding: 64px 0;
}

.result-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 48px;
  text-align: center;
  color: var(--vc-ink-soft);
}

.result-state--error { color: #C0392B; }

.result-icon {
  font-size: 48px;
  line-height: 1;
}

/* Spinner */
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(0,0,0,.1);
  border-top-color: var(--vc-accent);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.result-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 32px;
  gap: 16px;
  flex-wrap: wrap;
}

.result-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -.3px;
  color: var(--vc-ink);
  line-height: 1.1;
}

.result-subtitle {
  font-size: 14px;
  color: var(--vc-ink-muted);
  margin-top: 4px;
}

.result-date {
  font-size: 13px;
  color: var(--vc-ink-muted);
  flex-shrink: 0;
  padding-top: 6px;
}

/* Stats grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--vc-white);
  border: 1px solid var(--vc-border);
  border-radius: var(--radius);
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stat-card--highlight {
  background: var(--vc-ink);
  border-color: var(--vc-ink);
  color: var(--vc-white);
}

.stat-label {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--vc-ink-muted);
}

.stat-card--highlight .stat-label { color: rgba(255,255,255,.6); }

.stat-value {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
  color: var(--vc-ink);
}

.stat-card--highlight .stat-value { color: var(--vc-accent); }

.result-sample {
  font-size: 14px;
  color: var(--vc-ink-muted);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Confidence badge */
.confidence-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .5px;
}

.confidence-badge.high   { background: #D4EFCE; color: #2E7D32; }
.confidence-badge.medium { background: #FFF3CD; color: #856404; }
.confidence-badge.low    { background: #FDECEA; color: #B71C1C; }

/* Sinal de leilão - preço realizado */
.leilao-card {
  background: var(--vc-surface-dark);
  border: 1px solid var(--vc-accent);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-card);
}

.leilao-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.leilao-badge {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 100px;
  background: var(--vc-accent);
  color: var(--vc-ink);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .5px;
  text-transform: uppercase;
}

.leilao-fonte {
  font-size: 13px;
  color: rgba(255,255,255,.6);
}

.leilao-explain {
  margin: 12px 0 18px;
  font-size: 14px;
  color: rgba(255,255,255,.75);
}

.leilao-filtro-nota {
  margin: -6px 0 16px;
  padding: 10px 12px;
  border: 1px solid rgba(212, 187, 106, .35);
  border-radius: 10px;
  background: rgba(212, 187, 106, .09);
  font-size: 13px;
  color: rgba(255,255,255,.86);
}

.leilao-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.leilao-stat-label {
  display: block;
  font-family: 'Teko', sans-serif;
  font-size: 14px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255,255,255,.55);
}

.leilao-stat-value {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--vc-accent);
}

.leilao-vendas {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid rgba(255,255,255,.15);
}

.leilao-vendas li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,.08);
  font-size: 14px;
}

.leilao-vendas a {
  color: var(--vc-white);
  text-decoration: none;
  transition: color var(--transition);
}

.leilao-vendas a:hover { color: var(--vc-accent); }

.leilao-venda-preco {
  font-weight: 600;
  color: var(--vc-accent);
  white-space: nowrap;
}

/* Anúncios table */
.anuncios-details {
  margin-top: 8px;
}

.anuncios-details summary {
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--vc-accent-strong);
  padding: 8px 0;
  user-select: none;
}

.anuncios-table-wrap {
  overflow-x: auto;
  margin-top: 16px;
  border: 1px solid var(--vc-border);
  border-radius: var(--radius);
}

.anuncios-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.anuncios-table th {
  background: var(--vc-surface-dark);
  color: rgba(255,255,255,.7);
  font-family: 'Teko', sans-serif;
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 10px 14px;
  text-align: left;
  white-space: nowrap;
}

.anuncios-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--vc-border);
  color: var(--vc-ink-soft);
  vertical-align: middle;
}

.anuncios-table tbody tr:last-child td { border-bottom: none; }
.anuncios-table tbody tr:hover { background: var(--vc-surface); }

.anuncios-table a {
  color: var(--vc-accent-strong);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.anuncios-list {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.anuncios-list li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--vc-border);
  border-radius: var(--radius);
  background: var(--vc-surface);
  flex-wrap: wrap;
}

.anuncios-list a {
  color: var(--vc-accent-strong);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.anuncio-preco {
  font-weight: 700;
  font-size: 13px;
  white-space: nowrap;
  color: var(--vc-ink);
}

.anuncio-fonte {
  font-size: 11px;
  opacity: 0.55;
  white-space: nowrap;
}

.anuncio-versao {
  font-size: 11px;
  font-weight: 600;
  color: var(--vc-accent-strong);
  white-space: nowrap;
}

.anuncio-ano {
  font-size: 11px;
  font-weight: 600;
  color: var(--vc-ink-muted);
  white-space: nowrap;
}

/* Anúncio que existe mas não entrou na conta (preço discrepante ou sem ano) */
.anuncios-list li.anuncio-fora { opacity: 0.7; border-style: dashed; }

.anuncio-nota {
  font-size: 11px;
  font-style: italic;
  color: var(--vc-ink-muted);
  white-space: nowrap;
}

/* Year breakdown table (resultado principal) */
.year-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--vc-border);
  border-radius: var(--radius);
  margin-bottom: 24px;
}

.year-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.year-table th {
  background: var(--vc-surface-dark);
  color: rgba(255,255,255,.75);
  font-family: 'Teko', sans-serif;
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 12px 16px;
  text-align: left;
  white-space: nowrap;
}

.year-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--vc-border);
  color: var(--vc-ink-soft);
  vertical-align: middle;
}

.year-table tbody tr:last-child td { border-bottom: none; }
.year-table tbody tr:hover { background: var(--vc-surface-warm); }

.year-table .year-cell {
  font-family: 'Teko', sans-serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--vc-ink);
  letter-spacing: .5px;
}

.year-table .price-cell {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--vc-accent);
}

.year-table .amostra-cell {
  font-size: 13px;
  color: var(--vc-ink-muted);
}

/* ══════════════════════════════════════════════
   COMO CALCULAMOS
   ══════════════════════════════════════════════ */
.section-light { background: var(--vc-white); padding: 80px 0; }
.section-dark  { background: var(--vc-surface-dark); padding: 80px 0; color: var(--vc-white); }

.section-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  letter-spacing: -.3px;
  margin-bottom: 48px;
  text-align: center;
}

.section-dark .section-title { color: var(--vc-white); }

/* Steps */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
}

.step {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.step-num {
  font-family: 'Teko', sans-serif;
  font-size: 48px;
  font-weight: 700;
  color: var(--vc-accent);
  line-height: 1;
}

.step h3 {
  font-size: 20px;
  font-weight: 600;
}

.step p {
  font-size: 15px;
  color: var(--vc-ink-soft);
  line-height: 1.55;
}

/* ══════════════════════════════════════════════
   FONTES
   ══════════════════════════════════════════════ */
.sources-intro {
  font-size: 15px;
  color: rgba(255,255,255,.65);
  margin-bottom: 36px;
  max-width: 560px;
}

.sources-intro strong {
  color: var(--vc-accent);
  font-weight: 600;
}

.sources-category-label {
  font-family: 'Teko', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--vc-accent);
  margin: 32px 0 12px;
  opacity: .85;
}

.sources-category-label:first-of-type { margin-top: 0; }

.sources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 12px;
  margin-bottom: 4px;
}

.source-card {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.source-card strong {
  font-size: 16px;
  color: var(--vc-white);
}

.source-card span:last-child {
  font-size: 13px;
  color: rgba(255,255,255,.5);
}

.source-status {
  font-family: 'Teko', sans-serif;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 100px;
  align-self: flex-start;
}

.source-status--active  { background: rgba(196,134,42,.15); color: var(--vc-accent); }
.source-status--planned { background: rgba(255,255,255,.08); color: rgba(255,255,255,.4); }

/* ══════════════════════════════════════════════
   SEGMENTOS
   ══════════════════════════════════════════════ */
.segments-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
}

.segment {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.segment-icon {
  font-size: 36px;
  line-height: 1;
}

.segment h3 {
  font-size: 20px;
  font-weight: 600;
}

.segment p {
  font-size: 15px;
  color: var(--vc-ink-soft);
  line-height: 1.55;
}

/* ══════════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════════ */
#footer {
  background: var(--vc-ink);
  padding: 40px 0;
  color: rgba(255,255,255,.5);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.footer-brand p {
  font-size: 14px;
  line-height: 1.5;
  max-width: 280px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  text-align: right;
}

.footer-lgpd {
  font-size: 11px;
  opacity: 0.55;
  margin-top: 4px;
}

/* ══════════════════════════════════════════════
   RESPONSIVE (home + geral)
   ══════════════════════════════════════════════ */
/* Quatro campos numa linha só cabem em tela larga */
@media (max-width: 980px) {
  .search-row { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 680px) {
  .search-row { grid-template-columns: 1fr; }
  .field-group--ano { min-width: 0; }
  .search-actions { flex-direction: column; }
  .header-nav { display: none; }
  .result-header { flex-direction: column; }
  .footer-inner { flex-direction: column; }
  .footer-links { text-align: left; }
  .hero-headline { font-size: 28px; }
}

/* ══════════════════════════════════════════════
   PÁGINA DE RESULTADO (/resultado)
   ══════════════════════════════════════════════ */

/* Estados fullscreen (loading / erro / vazio) */
.estado-fullscreen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  gap: 20px;
  text-align: center;
  padding: 48px 24px;
  color: var(--vc-ink-soft);
}

.estado-icon {
  font-size: 52px;
  line-height: 1;
}

.estado-hint {
  font-size: 14px;
  color: var(--vc-ink-muted);
  max-width: 420px;
}

/* Hero do resultado */
.res-hero {
  position: relative;
  background: linear-gradient(160deg, #000a05 0%, #000603 55%, #000200 100%);
  padding: 56px 0 52px;
  overflow: hidden;
}

.res-hero .hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 30%, rgba(196,134,42,.09) 0%, transparent 70%);
  pointer-events: none;
}

.res-hero-inner {
  position: relative;
  z-index: 1;
}

.res-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--vc-accent);
  margin-bottom: 14px;
}

.res-titulo {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(26px, 4vw, 46px);
  font-weight: 700;
  color: var(--vc-white);
  line-height: 1.15;
  letter-spacing: -.3px;
  margin-bottom: 14px;
}

.res-fontes {
  font-size: 13px;
  color: rgba(255,255,255,.5);
}

/* Seção de faixa */
.faixa-section {
  background: var(--vc-white);
  padding: 56px 0 48px;
  border-bottom: 1px solid var(--vc-border);
}

.faixa-label {
  font-family: 'Teko', sans-serif;
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--vc-ink-muted);
  margin-bottom: 32px;
}

/* Valor médio - número principal do recorte pesquisado */
.valor-medio {
  margin-bottom: 36px;
  padding-left: 18px;
  border-left: 4px solid var(--vc-accent);
}

.valor-medio .faixa-label { margin-bottom: 6px; }

.valor-medio-valor {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(36px, 6vw, 68px);
  font-weight: 700;
  color: var(--vc-ink);
  line-height: 1.05;
  margin: 0;
}

.valor-medio-sub {
  font-size: 13px;
  color: var(--vc-ink-muted);
  margin: 6px 0 0;
}

/* Recorte ativo (versão/ano) no topo do resultado */
.res-recorte {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.75);
  margin: 6px 0 0;
}

.res-recorte-remover {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Dica curta dentro de um detalhamento colapsível */
.breakdown-hint {
  font-size: 12px;
  color: var(--vc-ink-muted);
  margin: 4px 0 12px;
}

/* Linha da versão que está recortando o resultado */
.year-table tbody tr.linha-ativa td {
  background: var(--vc-surface-warm);
  font-weight: 600;
}

/* Display principal: min ━━━━━━━━━━━━ max */
.faixa-display {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 40px;
}

.faixa-polo {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
}

.faixa-polo--max { text-align: right; }

.faixa-valor {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(28px, 4vw, 54px);
  font-weight: 700;
  color: var(--vc-accent);
  line-height: 1;
}

.faixa-polo-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--vc-ink-muted);
}

.faixa-barra {
  flex: 1;
  height: 5px;
  background: linear-gradient(90deg, var(--vc-accent) 0%, #E8A93C 100%);
  border-radius: 3px;
  position: relative;
}

.faixa-barra::before,
.faixa-barra::after {
  content: '';
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--vc-accent);
  top: 50%;
  transform: translateY(-50%);
}

.faixa-barra::before { left: -1px; }
.faixa-barra::after  { right: -1px; }

/* Stats de suporte */
.faixa-stats {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.faixa-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.faixa-stat--badge { justify-content: flex-end; }

.faixa-stat-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--vc-ink-muted);
}

.faixa-stat-value {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--vc-ink);
}

.faixa-data {
  font-size: 12px;
  color: var(--vc-ink-muted);
  margin-top: 4px;
}

/* Detalhamento por ano */
#tabela-section {
  padding: 32px 0;
}

.ano-breakdown { border: none; }

.ano-breakdown-summary {
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--vc-accent-strong);
  padding: 8px 0;
  user-select: none;
  list-style: none;
}

.ano-breakdown-summary::before {
  content: '▶ ';
  font-size: 11px;
}

.ano-breakdown[open] .ano-breakdown-summary::before {
  content: '▼ ';
}

.anuncios-summary {
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--vc-accent-strong);
  padding: 8px 0;
  user-select: none;
}

/* CTA */
.res-cta {
  padding: 48px 0 64px;
  display: flex;
  justify-content: center;
}

/* ══════════════════════════════════════════════
   PAINEL ADMIN (/admin)
   ══════════════════════════════════════════════ */
.admin-badge-header {
  font-family: 'Teko', sans-serif;
  font-size: 14px;
  letter-spacing: 2px;
  text-transform: uppercase;
  background: var(--vc-accent);
  color: var(--vc-ink);
  padding: 4px 12px;
  border-radius: 4px;
  font-weight: 600;
}

.admin-main {
  padding: 48px 24px 80px;
  max-width: 960px;
}

.admin-page-header {
  margin-bottom: 40px;
}

.admin-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 32px;
  font-weight: 700;
  color: var(--vc-ink);
  margin-bottom: 6px;
}

.admin-sub {
  font-size: 15px;
  color: var(--vc-ink-muted);
}

.admin-section {
  margin-bottom: 48px;
}

.admin-section-title {
  font-family: 'Teko', sans-serif;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--vc-ink);
  border-bottom: 2px solid var(--vc-accent);
  padding-bottom: 8px;
  margin-bottom: 20px;
}

.admin-section-actions {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.admin-section-hint {
  font-size: 14px;
  color: var(--vc-ink-muted);
  margin: 0;
  flex: 1;
}

/* Stats cards */
.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.admin-stat-card {
  background: var(--vc-white);
  border: 1px solid var(--vc-border);
  border-radius: var(--radius);
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-stat-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--vc-ink-muted);
}

.admin-stat-value {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--vc-ink);
}

/* Tabela de fontes */
.admin-fonte-lista {
  margin-top: 8px;
  border: 1px solid var(--vc-border);
  border-radius: var(--radius);
  overflow: hidden;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.admin-table th {
  background: var(--vc-surface-dark);
  color: rgba(255,255,255,.7);
  font-family: 'Teko', sans-serif;
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 10px 16px;
  text-align: left;
}

.admin-table td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--vc-border);
  color: var(--vc-ink-soft);
}

.admin-table tbody tr:last-child td { border-bottom: none; }
.admin-table tbody tr:hover { background: var(--vc-surface); }

.admin-fonte-nome {
  font-weight: 600;
  color: var(--vc-ink);
}

/* Source grid */
.admin-source-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.admin-source-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--vc-white);
  border: 1px solid var(--vc-border);
  border-radius: var(--radius);
  padding: 14px 18px;
  transition: border-color 0.2s;
}

.admin-source-card--loading  { border-color: var(--vc-accent); }
.admin-source-card--ok       { border-color: #2E7D32; }
.admin-source-card--erro     { border-color: #C0392B; }
.admin-source-card--inativa  { opacity: 0.5; }
.admin-source-card--inativa .admin-source-nome { color: var(--vc-ink-muted); }

.admin-badge-inativa {
  font-size: 10px;
  font-weight: 700;
  color: var(--vc-ink-muted);
  background: var(--vc-border);
  border-radius: 3px;
  padding: 1px 6px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  white-space: nowrap;
}

.admin-source-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.admin-source-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.admin-source-nome {
  font-size: 14px;
  font-weight: 600;
  color: var(--vc-ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Barra de progresso */
.admin-progress-wrap {
  height: 5px;
  background: var(--vc-border);
  border-radius: 3px;
  overflow: hidden;
  display: none;
}

.admin-source-card--loading .admin-progress-wrap,
.admin-source-card--ok      .admin-progress-wrap,
.admin-source-card--erro    .admin-progress-wrap {
  display: block;
}

.admin-progress-bar {
  height: 100%;
  width: 0%;
  border-radius: 3px;
}

.admin-source-card--loading .admin-progress-bar {
  width: 100%;
  background: linear-gradient(
    90deg,
    var(--vc-accent) 0%,
    #a0522d 40%,
    var(--vc-accent) 80%
  );
  background-size: 200% 100%;
  animation: prog-slide 1.4s linear infinite;
}

.admin-source-card--ok .admin-progress-bar {
  width: 100%;
  background: #2E7D32;
  animation: none;
}

.admin-source-card--erro .admin-progress-bar {
  width: 100%;
  background: #C0392B;
  animation: none;
}

@keyframes prog-slide {
  0%   { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

/* Mensagem de resultado abaixo da barra */
.admin-progress-msg {
  font-size: 12px;
  min-height: 0;
  line-height: 1.4;
  display: none;
}

.admin-source-card--loading .admin-progress-msg,
.admin-source-card--ok      .admin-progress-msg,
.admin-source-card--erro    .admin-progress-msg {
  display: block;
}

.admin-source-card--loading .admin-progress-msg { color: var(--vc-ink-muted); }
.admin-source-card--ok      .admin-progress-msg { color: #2E7D32; font-weight: 600; }
.admin-source-card--erro    .admin-progress-msg { color: #C0392B; font-weight: 600; }

.admin-btn-coletar {
  flex-shrink: 0;
  font-size: 13px !important;
  padding: 6px 14px !important;
}

.admin-loading-text {
  font-size: 14px;
  color: var(--vc-ink-muted);
  padding: 16px 0;
}

/* Log */
.admin-log {
  background: var(--vc-ink);
  border-radius: var(--radius);
  padding: 20px;
  min-height: 160px;
  max-height: 400px;
  overflow-y: auto;
  font-family: 'Courier New', monospace;
  font-size: 13px;
  line-height: 1.6;
}

.admin-log-placeholder {
  color: rgba(255,255,255,.3);
  font-style: italic;
}

.admin-log-line {
  color: rgba(255,255,255,.85);
  padding: 2px 0;
  border-bottom: 1px solid rgba(255,255,255,.05);
}

.admin-log-line--ok   { color: #81C784; }
.admin-log-line--erro { color: #E57373; }

.admin-log-ts {
  color: rgba(255,255,255,.35);
  margin-right: 8px;
  font-size: 11px;
}

.admin-clear-log {
  margin-top: 10px;
  font-size: 13px !important;
  padding: 6px 14px !important;
  color: var(--vc-ink-muted) !important;
  border-color: var(--vc-border) !important;
}

/* ══════════════════════════════════════════════
   RESPONSIVE (resultado + admin)
   ══════════════════════════════════════════════ */
@media (max-width: 680px) {
  .faixa-display { flex-direction: column; gap: 16px; }
  .faixa-barra { display: none; }
  .faixa-polo--max { text-align: left; }
  .faixa-stats { gap: 24px; }
  .admin-source-grid { grid-template-columns: 1fr; }
  .admin-stats-grid  { grid-template-columns: 1fr 1fr; }
}

/* ══════════════════════════════════════════════
   ANÚNCIOS - /admin/anuncios
   ══════════════════════════════════════════════ */

/* Filtros */
.an-filters-section { padding-bottom: 0; }
.an-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px 16px;
}
.an-filter-group { display: flex; flex-direction: column; gap: 4px; }
.an-filter-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--vc-ink-muted);
}
.an-filter-input,
.an-filter-select {
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--vc-border);
  border-radius: var(--radius);
  background: var(--vc-white);
  color: var(--vc-ink);
  font-size: 14px;
  font-family: inherit;
  min-width: 160px;
}
.an-filter-input--short { min-width: 90px; max-width: 90px; }
.an-filter-select--sm   { min-width: 70px; max-width: 70px; }
.an-filter-input:focus,
.an-filter-select:focus {
  outline: 2px solid var(--vc-accent);
  outline-offset: 2px;
}
.an-filter-btn { height: 36px; align-self: flex-end; }

/* Toolbar (sumário + page size) */
.an-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0 8px;
  gap: 16px;
  flex-wrap: wrap;
}
.an-total {
  font-size: 13px;
  color: var(--vc-ink-muted);
}
.an-page-size-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Tabela */
.an-table-section { padding-top: 0; }
.an-table-wrap { overflow-x: auto; }
.an-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.an-th {
  padding: 9px 12px;
  background: var(--vc-surface-warm);
  border-bottom: 2px solid var(--vc-border);
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--vc-ink-muted);
  white-space: nowrap;
}
.an-th--sortable {
  cursor: pointer;
  user-select: none;
}
.an-th--sortable:hover { background: var(--vc-border); color: var(--vc-ink); }
.an-th--num { text-align: right; }
.an-sort-icon { margin-left: 4px; color: var(--vc-accent); }

.an-td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--vc-border);
  vertical-align: middle;
  color: var(--vc-ink);
  max-width: 320px;
}
.an-td--titulo { max-width: 380px; }
.an-td--num  { text-align: right; font-variant-numeric: tabular-nums; }
.an-td--data { white-space: nowrap; color: var(--vc-ink-muted); }
.an-td--fonte { white-space: nowrap; }

.an-table tr:hover td { background: var(--vc-surface); }

.an-link {
  color: var(--vc-accent);
  text-decoration: none;
  font-weight: 500;
}
.an-link:hover { text-decoration: underline; }

.an-badge-fonte {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 20px;
  background: var(--vc-surface-warm);
  border: 1px solid var(--vc-border);
  font-size: 11px;
  font-weight: 600;
  color: var(--vc-ink-soft);
  letter-spacing: .03em;
}

.an-empty {
  padding: 32px;
  text-align: center;
  color: var(--vc-ink-muted);
  font-style: italic;
}
.an-empty--erro { color: #C0392B; font-style: normal; font-weight: 600; }

/* Paginação */
.an-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  padding: 20px 0 32px;
}
.an-page-btn {
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--vc-border);
  border-radius: var(--radius);
  background: var(--vc-white);
  color: var(--vc-ink);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
}
.an-page-btn:hover { background: var(--vc-surface-warm); border-color: var(--vc-accent); }
.an-page-btn--active {
  background: var(--vc-accent);
  border-color: var(--vc-accent);
  color: #fff;
  font-weight: 700;
  cursor: default;
}
.an-page-ellipsis {
  line-height: 36px;
  padding: 0 4px;
  color: var(--vc-ink-muted);
  font-size: 14px;
}

@media (max-width: 680px) {
  .an-filters { flex-direction: column; }
  .an-filter-input, .an-filter-select { min-width: 100%; }
  .an-filter-input--short, .an-filter-select--sm { max-width: 100%; }
  .an-td--titulo { max-width: 200px; }
}
