/* ============================================================
   Meus Anúncios - Custom Styles (compatível com Bootstrap 5)
   ============================================================ */

/* Fonte padrão */
body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: #111827;
  font-size: 1rem;
}

/* Smooth scroll + tamanho-base de fonte (todas as fontes rem escalam com esta base) */
html {
  scroll-behavior: smooth;
  font-size: 16px;
}

/* Links do footer */
.footer-link {
  color: #6b7280;
  text-decoration: none;
  transition: color 0.2s;
}
.footer-link:hover {
  color: #0ea5e9;
}

/* Classe hidden (compatível com o toggle usado nas páginas) */
.hidden {
  display: none !important;
}

/* Custom animations */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

.animate-float {
  animation: float 4s ease-in-out infinite;
}

/* Scroll-reveal (respeita prefers-reduced-motion) */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
[data-reveal].revealed {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Gradient text utility */
.gradient-text {
  background: linear-gradient(to right, #0284c7, #f97316);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ============================================================
   Marca / Botões
   ============================================================ */

/* Base uniforme para todos os botões (evita tamanhos inconsistentes) */
.btn {
  font-size: 0.95rem;
  padding: 0.55rem 1.25rem;
  border-radius: 0.5rem;
}

/* Botão com gradiente da marca (azul -> laranja) */
.btn-brand {
  background: linear-gradient(90deg, #0284c7, #f97316);
  color: #fff;
  border: none;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.25);
  transition: all 0.2s;
}
.btn-brand:hover,
.btn-brand:focus {
  color: #fff;
  filter: brightness(1.08);
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.35);
}
.btn-brand:disabled {
  color: #fff;
}

/* Botão com gradiente acento (laranja -> azul) */
.btn-accent {
  background: linear-gradient(90deg, #ea580c, #0284c7);
  color: #fff;
  border: none;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(234, 88, 12, 0.25);
  transition: all 0.2s;
}
.btn-accent:hover,
.btn-accent:focus {
  color: #fff;
  filter: brightness(1.08);
}
.btn-accent:disabled {
  color: #fff;
}

/* Cores de texto da marca */
.text-brand {
  color: #0284c7 !important;
}
.text-accent {
  color: #ea580c !important;
}

/* Bordas da marca */
.border-brand {
  border-color: #0ea5e9 !important;
}
.border-accent {
  border-color: #f97316 !important;
}

/* Fundo das telas de autenticação */
.auth-bg {
  background: linear-gradient(135deg, #f0f9ff, #ffffff 50%, #fff7ed);
}

/* ============================================================
   Badges suaves (soft) - substituem utilitários do Tailwind
   ============================================================ */
.badge-soft-success { background-color: #d1fae5; color: #047857; }
.badge-soft-warning { background-color: #fef3c7; color: #b45309; }
.badge-soft-danger  { background-color: #fee2e2; color: #b91c1c; }
.badge-soft-info    { background-color: #dbeafe; color: #1d4ed8; }
.badge-soft-secondary { background-color: #f3f4f6; color: #4b5563; }
.badge-soft-primary { background-color: #e0f2fe; color: #0369a1; }
.badge-soft-accent  { background-color: #ffedd5; color: #c2410c; }
.badge-soft-dark    { background-color: #e5e7eb; color: #111827; }

/* Cartões de status (resumo financeiro) */
.card-stat {
  background: #f9fafb;
  border: none;
  border-radius: 0.75rem;
}

/* ============================================================
   Form styles
   ============================================================ */
.form-input {
  display: block;
  width: 100%;
  padding: 0.6rem 0.9rem;
  border: 1.5px solid #e5e7eb;
  border-radius: 0.5rem;
  font-size: 0.98rem;
  color: #111827;
  background-color: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus {
  outline: none;
  border-color: #0284c7;
  box-shadow: 0 0 0 0.2rem rgba(2, 132, 199, 0.15);
}

.form-label {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.5rem;
}

/* Button ripple effect */
.btn-ripple {
  position: relative;
  overflow: hidden;
}

.btn-ripple::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
  background-image: radial-gradient(circle, #fff 10%, transparent 10.01%);
  background-repeat: no-repeat;
  background-position: 50%;
  transform: scale(10, 10);
  opacity: 0;
  transition: transform 0.5s, opacity 1s;
}

.btn-ripple:active::after {
  transform: scale(0, 0);
  opacity: 0.3;
  transition: 0s;
}

/* Toast notification */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #1f2937;
  color: white;
  padding: 1rem 1.5rem;
  border-radius: 0.75rem;
  font-size: 0.95rem;
  font-weight: 500;
  z-index: 2000;
  transition: transform 0.3s ease;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  max-width: calc(100vw - 2rem);
  text-align: center;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
}

.toast.error {
  background: #dc2626;
}

.toast.success {
  background: #059669;
}

/* Auth card entrance animation */
.auth-card {
  animation: fadeInUp 0.6s ease-out;
}

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

/* Loading spinner */
.spinner {
  display: inline-block;
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* ============================================================
   Dashboard
   ============================================================ */

/* Sidebar (offcanvas) — fixa no desktop, desliza no mobile */
.offcanvas-sidebar {
  --bs-offcanvas-width: 260px;
  background-color: #111827 !important;
  color: #fff;
}
.offcanvas-sidebar .offcanvas-header,
.offcanvas-sidebar .offcanvas-body {
  color: #fff;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.6rem 1rem;
  border: none;
  background: transparent;
  color: #9ca3af;
  border-radius: 0.5rem;
  font-weight: 500;
  font-size: 0.9rem;
  text-align: left;
  transition: all 0.2s;
}
.sidebar-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}
.sidebar-link.active {
  background: rgba(14, 165, 233, 0.15);
  color: #38bdf8;
}
.sidebar-link .bi {
  font-size: 1.05rem;
}

.sidebar-user {
  border-top: 1px solid #1f2937;
}

/* No desktop (lg+), a sidebar fica sempre visível em flexbox (nunca sobrepõe o conteúdo) */
@media (min-width: 992px) {
  .dashboard-shell {
    display: flex;
    align-items: stretch;
  }
  .offcanvas-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    flex: 0 0 260px;
    width: 260px;
    transform: none !important;
    visibility: visible !important;
  }
  .main-content {
    flex: 1 1 auto;
    min-width: 0;
    margin-left: 0;
  }
}

/* Abas (guia / admin) em estilo pill */
.pill-tab {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 0.75rem;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #4b5563;
  transition: all 0.2s;
}

@media (max-width: 991.98px) {
  .pill-tab {
    font-size: 0.8rem;
    padding: 0.35rem 0.75rem;
  }
}
.pill-tab:hover {
  border-color: #9ca3af;
}
.pill-tab.active {
  background: linear-gradient(90deg, #0284c7, #f97316);
  color: #fff;
  border-color: transparent;
}

/* Gráfico */
.chart-box {
  height: 260px;
  position: relative;
}

/* Tabelas em telas pequenas ficam com rolagem horizontal */
.table-responsive {
  -webkit-overflow-scrolling: touch;
}

.table > :not(caption) > * > * {
  padding: 0.75rem 1rem;
}

/* Modais: garantir que funcionem no celular */
.modal-content {
  border: none;
  border-radius: 1rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

/* Bloco de código da zona */
.code-block {
  background: #111827;
  color: #f3f4f6;
  border-radius: 0.75rem;
  padding: 1rem;
  font-size: 0.9rem;
  overflow-x: auto;
}
.code-block pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-all;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* Cards de métrica */
.metric-card .metric-value {
  font-size: 1.2rem;
  font-weight: 700;
}

/* Títulos de seção e cabeçalho do dashboard */
.main-content h1,
.main-content h2 {
  font-size: 1.35rem;
}
.main-content h3 {
  font-size: 1.15rem;
}
.main-content .display-5 {
  font-size: 2rem;
}

/* ============================================================
   Landing page - utilitários visuais
   ============================================================ */

/* Espaçamento grande para seções */
.py-lg-6 { padding-top: 5rem !important; padding-bottom: 5rem !important; }

/* Largura automática a partir de md */
@media (min-width: 768px) {
  .w-md-auto { width: auto !important; }
}

/* Largura mínima 0 (truncar texto em flex) */
.min-w-0 { min-width: 0; }

/* Pontos da legenda de gráficos */
.legend-dot {
  display: inline-block;
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 0.25rem;
}

/* Círculos numerados do guia */
.step-circle {
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 0.5rem;
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.step-circle.bg-accent { background: linear-gradient(135deg, #f97316, #c2410c) !important; }
.step-circle.bg-primary { background: linear-gradient(135deg, #0ea5e9, #0369a1) !important; }

/* Fonte extra-bold */
.fw-extrabold { font-weight: 800 !important; }

/* Logo */
.logo-box {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, #0ea5e9, #f97316);
  display: flex;
  align-items: center;
  justify-content: center;
}
.logo-box .bi { font-size: 1.15rem; }

/* Logo real (SVG) */
.logo-img {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.6rem;
  object-fit: contain;
  flex-shrink: 0;
}

/* Gradiente da marca para fundos */
.bg-brand-gradient {
  background: linear-gradient(90deg, #0284c7, #f97316);
}

/* Hero */
.hero-section {
  background: linear-gradient(135deg, #f0f9ff, #ffffff 50%, #fff7ed);
}
.hero-glow {
  position: absolute;
  border-radius: 9999px;
  filter: blur(60px);
  pointer-events: none;
}
.hero-glow-1 { top: 5rem; left: 2rem; width: 18rem; height: 18rem; background: rgba(125, 211, 252, 0.4); }
.hero-glow-2 { bottom: 3rem; right: 2rem; width: 18rem; height: 18rem; background: rgba(253, 186, 116, 0.4); }
.hero-badge {
  background: #e0f2fe;
  color: #0369a1;
  padding: 0.5rem 1rem;
  font-size: 0.95rem;
}
.status-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: #0ea5e9;
  display: inline-block;
  animation: pulse 1.5s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* Cabeçalho de seção */
.section-kicker {
  display: inline-block;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #0284c7;
}
.section-kicker-accent { color: #ea580c; }

/* Passos "Como funciona" */
.step-card { transition: box-shadow 0.2s; }
.step-card:hover { box-shadow: 0 20px 40px rgba(0,0,0,0.12) !important; }
.step-number {
  position: absolute;
  top: -1.25rem;
  left: 2rem;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, #0ea5e9, #0369a1);
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(14, 165, 233, 0.35);
}
.step-number-accent { background: linear-gradient(135deg, #f97316, #c2410c); box-shadow: 0 8px 20px rgba(249, 115, 22, 0.35); }
.step-number-green { background: linear-gradient(135deg, #10b981, #047857); box-shadow: 0 8px 20px rgba(16, 185, 129, 0.35); }

/* Círculos de ícone */
.icon-circle {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.icon-circle .bi { font-size: 1.4rem; }

.bg-primary-soft { background-color: #e0f2fe !important; }
.bg-accent-soft  { background-color: #ffedd5 !important; }
.bg-success-soft { background-color: #d1fae5 !important; }
.bg-warning-soft { background-color: #fef3c7 !important; }
.bg-danger-soft  { background-color: #fee2e2 !important; }
.bg-dark-light   { background-color: #1f2937 !important; }

/* Amostra de cor de campanha */
.color-swatch {
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
}
.color-primary { background: linear-gradient(135deg, #38bdf8, #0284c7); }
.color-accent  { background: linear-gradient(135deg, #fb923c, #ea580c); }
.color-success { background: linear-gradient(135deg, #34d399, #059669); }

/* Janela do editor (publishers) */
.window-dot { width: 0.75rem; height: 0.75rem; border-radius: 50%; display: inline-block; }
.skeleton-line { height: 0.75rem; background: #1f2937; border-radius: 0.25rem; }
.skeleton-block { height: 5rem; flex: 1; background: #1f2937; border-radius: 0.5rem; }

/* Skeleton loading (shimmer) para painel e tabelas */
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.skeleton-bar {
  background: linear-gradient(90deg, #e5e9f0 25%, #f1f4f8 50%, #e5e9f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease infinite;
  border-radius: 0.375rem;
  height: 1rem;
}
.skeleton-bar.metric { width: 6rem; height: 1.7rem; }
.skeleton-row { padding: 0.9rem 0; }
.skeleton-row .skeleton-bar { height: 0.9rem; }

/* Ícones de segurança */
.security-icon {
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.security-icon .bi { font-size: 0.9rem; }

/* Avatares de depoimento */
.avatar {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.avatar-primary { background: linear-gradient(135deg, #38bdf8, #0284c7); }
.avatar-accent  { background: linear-gradient(135deg, #fb923c, #ea580c); }
.avatar-success { background: linear-gradient(135deg, #34d399, #059669); }

/* CTA final */
.cta-section {
  background: linear-gradient(90deg, #0284c7, #f97316);
}
.cta-glow {
  position: absolute;
  border-radius: 9999px;
  filter: blur(70px);
  opacity: 0.15;
  pointer-events: none;
}
.cta-glow-1 { top: -2rem; left: -2rem; width: 16rem; height: 16rem; background: #fff; }
.cta-glow-2 { bottom: -2rem; right: -2rem; width: 16rem; height: 16rem; background: #fff; }

/* ============================================================
   Escala de fontes (utilidades do Bootstrap, proporcional)
   ============================================================ */
.fs-1 { font-size: 2rem !important; }
.fs-2 { font-size: 1.75rem !important; }
.fs-3 { font-size: 1.5rem !important; }
.fs-4 { font-size: 1.25rem !important; }
.fs-5 { font-size: 1.1rem !important; }
.fs-6 { font-size: 1rem !important; }

/* Display headings (hero da landing) */
.display-1 { font-size: 3.25rem !important; }
.display-2 { font-size: 2.9rem !important; }
.display-3 { font-size: 2.55rem !important; }
.display-4 { font-size: 2.2rem !important; }
.display-5 { font-size: 1.9rem !important; }
.display-6 { font-size: 1.5rem !important; }
