:root {
  --pf-radius-sm: 0.5rem;
  --pf-radius-md: 0.75rem;
  --pf-radius-lg: 1rem;
  --pf-shadow-sm: 0 2px 12px rgba(15, 23, 42, 0.08);
  --pf-shadow-md: 0 8px 24px rgba(15, 23, 42, 0.1);
  --pf-focus-ring: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
  --pf-content-sm: 28rem;
  --pf-content-md: 36rem;
  --pf-content-lg: 48rem;
  /* Landing / nav (Acha Leads) */
  --pl-ink: #0f172a;
  --pl-muted: #64748b;
  --pl-accent: #2563eb;
  --pl-accent-hover: #1d4ed8;
  --pl-line: rgba(15, 23, 42, 0.08);
  --pl-hero-tint: #eef4fc;
  --pl-arc: rgba(37, 99, 235, 0.08);
  --pl-nav-h: 3.5rem;
}

.app-body {
  color: #0f172a;
  font-family:
    "Plus Jakarta Sans",
    system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
}

/* Barra superior (mesmo visual da landing) */
.pl-nav {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--pl-line);
}

.pl-logo {
  font-weight: 800;
  font-size: clamp(1.2rem, 2vw, 1.35rem);
  letter-spacing: -0.03em;
  color: var(--pl-ink);
}

.pl-logo span {
  color: var(--pl-accent);
}

.pl-body {
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--pl-ink);
  background: #fff;
  min-height: 100dvh;
}

.pl-nav-link {
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--pl-muted);
  padding: 0.2rem 0.35rem;
  border-radius: 0.35rem;
  white-space: nowrap;
}

.pl-nav-link:hover {
  color: var(--pl-ink);
}

.pl-nav-link--active {
  color: var(--pl-accent);
}

.pl-nav-account-btn {
  max-width: 12rem;
}

.pl-nav-account-btn .pl-nav-account-label {
  display: inline-block;
  max-width: 9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
}

/* Saldo + atalho recarga (um único controlo no nav) */
.pl-nav-credits {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--pl-accent);
  background: rgba(37, 99, 235, 0.1);
  border: 1px solid rgba(37, 99, 235, 0.28);
  border-radius: 999px;
  padding: 0.38rem 0.65rem 0.38rem 0.75rem;
  white-space: nowrap;
  transition:
    color 0.15s ease,
    background 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.pl-nav-credits:hover {
  color: #fff;
  background: var(--pl-accent);
  border-color: var(--pl-accent);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

.pl-nav-credits:focus-visible {
  outline: none;
  box-shadow: var(--pf-focus-ring);
}

.pl-nav-credits--active {
  color: #fff;
  background: var(--pl-accent);
  border-color: var(--pl-accent);
}

.pl-nav-credits__plus {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.05rem;
  line-height: 1;
  margin-left: 0.1rem;
  opacity: 0.95;
}

.app-card {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: var(--pf-radius-lg);
  box-shadow: var(--pf-shadow-sm);
  background: #fff;
}

.app-btn-primary {
  border-radius: 999px;
  font-weight: 600;
}

.app-input-lg {
  min-height: 48px;
  border-radius: var(--pf-radius-md);
}

.app-container-sm {
  max-width: var(--pf-content-sm);
}

.app-container-md {
  max-width: var(--pf-content-md);
}

.app-container-lg {
  max-width: var(--pf-content-lg);
}

.app-text-micro {
  font-size: 0.75rem;
}

.app-kicker {
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.badge.app-badge {
  border-radius: 999px;
  font-weight: 600;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.btn:focus-visible,
.form-check-input:focus-visible {
  outline: none;
  box-shadow: var(--pf-focus-ring);
}

/* Auth / allauth entrance — fundo alinhado à landing (#eef4fc) */
.auth-page-bg {
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: linear-gradient(180deg, #eef4fc 0%, #f1f5f9 50%, #f8fafc 100%);
}

.auth-brand-link {
  font-size: clamp(1.35rem, 4vw, 1.65rem);
  letter-spacing: -0.02em;
}

.auth-brand-acha {
  font-weight: 800;
  color: #0f172a;
}

.auth-brand-leads {
  font-weight: 800;
  color: #2563eb;
}

.auth-brand-tagline {
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.7rem;
}

/*
 * Largura auth: uma coluna, ~28rem — evita linhas longas e card “esticado”.
 * Não usar .container do Bootstrap aqui (ele abre demais em telas largas).
 */
.auth-shell-wrap {
  width: 100%;
  max-width: 28rem;
  margin-inline: auto;
}

/* Área “gestão” allauth (mais conteúdo horizontal) */
.auth-shell-wrap--manage {
  max-width: 34rem;
}

.auth-entrance-card {
  border-radius: var(--pf-radius-lg);
  box-shadow: var(--pf-shadow-md);
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.auth-entrance-card-body {
  border-radius: inherit;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0.25rem 0 1rem;
  color: #64748b;
  font-size: 0.8125rem;
  font-weight: 500;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1 1 0;
  height: 1px;
  background: rgba(15, 23, 42, 0.1);
}

.auth-sso-hint {
  font-size: 0.8125rem;
  color: #64748b;
  line-height: 1.45;
}

.auth-mail-icon {
  width: 4.5rem;
  height: 4.5rem;
}

.auth-btn-group .btn-lg {
  min-height: 3rem;
}

/* Resultados de busca — métricas e nota Google */
.results-metric-card {
  border-color: rgba(15, 23, 42, 0.08) !important;
}

.results-metric-skeleton .skeleton-line {
  height: 0.85rem;
  border-radius: var(--pf-radius-sm);
  background: linear-gradient(
    90deg,
    rgba(15, 23, 42, 0.06) 0%,
    rgba(37, 99, 235, 0.12) 50%,
    rgba(15, 23, 42, 0.06) 100%
  );
  background-size: 200% 100%;
  animation: results-metric-shimmer 1.25s ease-in-out infinite;
}

.results-metric-skeleton .skeleton-line--short {
  width: 58%;
}

@keyframes results-metric-shimmer {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}

.lead-rating-google-score {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #b45309;
}

.lead-rating-google-stars {
  font-size: 0.95rem;
  line-height: 1;
}

@media (max-width: 767.98px) {
  .dashboard-table-mobile tbody tr {
    display: block;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    padding: 0.6rem 0;
  }

  .dashboard-table-mobile tbody td {
    display: block;
    border: 0;
    padding: 0.2rem 0.6rem;
  }

  .dashboard-table-mobile thead {
    display: none;
  }

  .dashboard-table-mobile td[data-mobile-label]::before {
    content: attr(data-mobile-label);
    display: inline-block;
    min-width: 5.2rem;
    margin-right: 0.4rem;
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 600;
  }

  .dashboard-table-mobile td[data-mobile-label="Ações"] .dashboard-action-stack {
    display: flex;
    justify-content: flex-start;
    width: 100%;
    max-width: 100%;
  }
}

/* Tabelas largas: scroll horizontal em telas pequenas (Bootstrap + touch) */
.app-table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  max-width: 100%;
}

/* Senha: mostrar/ocultar (auth) */
.password-field-with-toggle {
  position: relative;
  width: 100%;
}
.password-field-with-toggle > input {
  width: 100%;
}
.password-field-with-toggle .password-toggle-btn {
  position: absolute;
  top: 50%;
  right: 0.35rem;
  transform: translateY(-50%);
  z-index: 4;
  width: 2.25rem;
  height: 2.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
.password-field-with-toggle .password-toggle-btn:focus-visible {
  outline: 2px solid var(--bs-primary);
  outline-offset: 2px;
  border-radius: 0.35rem;
}

/* Aviso de cookies (mobile-first) */
.app-cookie-banner {
  z-index: 10800;
}
.app-cookie-banner__card {
  backdrop-filter: blur(10px);
}
