.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

.modal-content {
  position: relative;
  background: linear-gradient(155deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.95));
  border: 1px solid var(--stroke);
  border-radius: 20px;
  padding: 2rem;
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.6);
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--stroke);
  color: var(--text);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 200ms ease;
}

.modal-close:hover {
  background: rgba(255, 59, 48, 0.3);
  border-color: rgba(255, 59, 48, 0.5);
}

.modal-titulo {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.comparacao-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1rem;
  align-items: center;
  margin-bottom: 2rem;
  padding: 1.25rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--stroke);
  border-radius: 16px;
}

.consultor-header {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.consultor-header.consultor-2 {
  flex-direction: row-reverse;
  text-align: right;
}

.consultor-header .rank-badge {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  font-weight: 700;
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
  border: 1px solid var(--stroke);
}

.consultor-header .info {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.consultor-header .nome {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
}

.consultor-header .anos {
  font-size: 0.85rem;
  color: var(--muted);
}

.vs {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
  padding: 0.5rem 1rem;
  border-radius: 8px;
}

.comparacao-selos {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--stroke);
  border-radius: 12px;
}

.selos-lista {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.selos-1 {
  justify-content: flex-end;
}

.selos-2 {
  justify-content: flex-start;
}

.selos-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
  padding: 0 0.5rem;
}

.selo-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.3rem 0.5rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--stroke);
  border-radius: 6px;
  font-size: 0.85rem;
}

.selo-badge .selo-icone {
  font-size: 1rem;
}

.selo-badge .selo-qtd {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent-2);
  background: rgba(79, 70, 229, 0.2);
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
  min-width: 1.2rem;
  text-align: center;
}

.sem-selos {
  font-size: 0.8rem;
  color: var(--muted);
  font-style: italic;
}

.comparacao-secao {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--stroke);
  border-radius: 12px;
}

.comparacao-secao h3 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--stroke);
  color: var(--accent-2);
}

.linha-comparacao {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1rem;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.linha-comparacao:last-child {
  border-bottom: none;
}

.label-centro {
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  min-width: 80px;
  text-align: center;
}

.valor {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  width: 100%;
}

.linha-comparacao .valor:first-child {
  justify-content: flex-end;
}

.linha-comparacao .valor:last-child {
  justify-content: flex-start;
}

.valor-numero {
  font-size: 1.1rem;
  font-weight: 700;
}

.valor-diff {
  font-size: 0.75rem;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-weight: 600;
}

.valor.maior .valor-numero {
  color: var(--success);
}

.valor.maior .valor-diff {
  background: rgba(34, 197, 94, 0.2);
  color: var(--success);
}

.valor.menor .valor-numero {
  color: var(--bronze);
}

.valor.menor .valor-diff {
  background: rgba(251, 146, 60, 0.2);
  color: var(--bronze);
}

.valor.igual .valor-numero {
  color: var(--muted);
}

.valor.igual .valor-diff {
  background: rgba(148, 163, 184, 0.2);
  color: var(--muted);
}

.comparacao-resumo {
  margin-top: 1.5rem;
  padding: 1.25rem;
  background: linear-gradient(145deg, rgba(79, 70, 229, 0.15), rgba(22, 169, 250, 0.1));
  border: 1px solid rgba(79, 70, 229, 0.3);
  border-radius: 12px;
  display: flex;
  justify-content: space-around;
  gap: 2rem;
}

.resumo-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.resumo-label {
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.resumo-valor {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}

.resumo-valor.diferenca {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.badge {
  font-size: 0.65rem;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  text-transform: uppercase;
  font-weight: 600;
}

.badge-ativo {
  background: linear-gradient(120deg, var(--success), #16a34a);
  color: #fff;
}

.badge-historico {
  background: linear-gradient(120deg, #64748b, #475569);
  color: #fff;
}

@media (max-width: 700px) {
  .modal-content {
    padding: 1.25rem;
  }

  .comparacao-header {
    grid-template-columns: 1fr;
    gap: 0.75rem;
    text-align: center;
  }

  .consultor-header,
  .consultor-header.consultor-2 {
    flex-direction: column;
    text-align: center;
  }

  .vs {
    order: 0;
  }

  .consultor-header:first-child {
    order: -1;
  }

  .linha-comparacao {
    grid-template-columns: 1fr 60px 1fr;
    gap: 0.5rem;
  }

  .valor {
    padding: 0.3rem 0.5rem;
    flex-direction: column;
    gap: 0.2rem;
  }

  .linha-comparacao .valor:first-child,
  .linha-comparacao .valor:last-child {
    flex-direction: column;
  }

  .valor-numero {
    font-size: 0.95rem;
  }

  .comparacao-resumo {
    flex-direction: column;
    gap: 1rem;
  }
}
