/* ==========================================================================
   💎 SUPER TITAN CRM — ESTILOS INSTITUCIONAIS E PÁGINAS PÚBLICAS
   Identidade: Ultimate Dark Core (Idêntica ao App SuperTitan)
   Cores: #0b141a (Fundo Chat), #111b21 (Fundo Painel), #00a884 (Verde WhatsApp)
   Mobile-First: 100% responsivo a partir de 320px / 360px sem overflow horizontal
   ========================================================================== */

:root {
  /* Cores extraídas diretamente de public/style.css */
  --bg-dark: #0b141a;       /* Fundo Chat (Deep Dark) */
  --bg-panel: #111b21;      /* Fundo Sidebar / Painel */
  --header: rgba(32, 44, 51, 0.95); /* Cabeçalho com transparência */
  --primary: #00a884;       /* Verde WhatsApp */
  --primary-hover: #00c298;
  --primary-glow: rgba(0, 168, 132, 0.25);
  --accent-green: #25d366;  /* Verde WhatsApp Bright */
  --danger: #ef5350;        /* Vermelho Suave */
  --warning: #f59e0b;       /* Alerta Laranja */
  --success: #00cc99;       /* Verde Sucesso */
  --text: #e9edef;          /* Texto Principal */
  --text-sec: #8696a0;      /* Texto Secundário */
  --msg-in: #202c33;        /* Balão Recebido */
  --msg-out: #005c4b;       /* Balão Enviado */
  --border: rgba(134, 150, 160, 0.15); /* Borda Padrão do App */
  --border-light: rgba(134, 150, 160, 0.28);
  --card-bg: #111b21;       /* Card padrão (Sidebar/Painel) */
  --card-inner: #1f2c34;    /* Card interno (Action menu do app) */
  
  /* Cantos Arredondados do App */
  --radius-sm: 8px;
  --radius-md: 12px;        /* Padrão de componentes do app */
  --radius-lg: 16px;        /* Padrão de cards do app */
  --radius-pill: 24px;      /* Botões pill do app */

  /* Tipografia do App */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --container-max: 980px;
}

/* ==========================================================================
   RESET & MOBILE-FIRST BASE
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  background-color: var(--bg-dark);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14.5px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  overflow-wrap: anywhere;
  word-break: normal;
}

/* Scrollbar idêntica a public/style.css */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Elementos de mídia e blocos contidos */
img, svg, video, canvas, audio, iframe, embed, object {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Links & Tipografia */
a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s ease, filter 0.2s ease;
  overflow-wrap: anywhere;
}
a:hover {
  color: var(--primary-hover);
}

h1, h2, h3, h4, h5 {
  color: var(--text);
  font-weight: 700;
  line-height: 1.3;
  overflow-wrap: anywhere;
  word-break: break-word;
}

h1 {
  font-size: clamp(1.6rem, 5vw, 2.3rem);
  margin-bottom: 0.85rem;
}
h2 {
  font-size: clamp(1.25rem, 4vw, 1.65rem);
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}
h3 {
  font-size: clamp(1.05rem, 3.5vw, 1.25rem);
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
}

p {
  margin-bottom: 1rem;
  color: #d1d7db;
  overflow-wrap: anywhere;
  word-break: normal;
}

ul, ol {
  margin-bottom: 1.25rem;
  padding-left: 1.25rem;
  color: #d1d7db;
}

li {
  margin-bottom: 0.5rem;
  overflow-wrap: anywhere;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  background: var(--msg-in);
  color: #53bdeb;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.88em;
  overflow-wrap: anywhere;
  word-break: break-all;
}

/* ==========================================================================
   CONTAINER RESPONSIVO (SEM ESTOURO)
   ========================================================================== */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 16px;
  padding-right: 16px;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .container {
    padding-left: 24px;
    padding-right: 24px;
  }
}

/* ==========================================================================
   CABEÇALHO & NAVEGAÇÃO (IDÊNTICO AO SIDEBAR-HEADER DO APP)
   ========================================================================== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  width: 100%;
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px; /* Mesma altura de 60px do header do app */
  gap: 12px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
  text-decoration: none;
  min-width: 0;
  flex-shrink: 1;
}

.logo-icon {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--primary) 0%, #128c7e 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  box-shadow: 0 2px 8px var(--primary-glow);
  flex-shrink: 0;
}

.logo-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.logo-text span {
  color: var(--primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link {
  color: var(--text-sec);
  font-weight: 500;
  font-size: 0.9rem;
  transition: color 0.2s ease;
  white-space: nowrap;
}
.nav-link:hover, .nav-link.active {
  color: #fff;
}
.nav-link.active {
  color: var(--primary);
  font-weight: 600;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Botão Toggle Mobile */
.mobile-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 1.25rem;
  padding: 4px 10px;
  cursor: pointer;
  line-height: 1;
  flex-shrink: 0;
}

@media (max-width: 820px) {
  .mobile-toggle {
    display: block;
  }
  .nav-links {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    width: 100%;
    background: var(--bg-panel);
    flex-direction: column;
    padding: 1rem 16px;
    border-bottom: 1px solid var(--border);
    gap: 0.75rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  }
  .nav-links.open {
    display: flex;
  }
  .nav-actions {
    display: none;
  }
}

/* ==========================================================================
   BOTÕES (IDÊNTICOS AOS BOTÕES PILL DO APP: .btn-primary)
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 12px 20px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.1s, filter 0.2s, box-shadow 0.2s, background-color 0.2s;
  text-align: center;
  max-width: 100%;
  width: auto;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
  box-sizing: border-box;
  line-height: 1.35;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background-color: var(--primary);
  color: #111b21;
  border-color: var(--primary);
  box-shadow: 0 2px 10px var(--primary-glow);
}
.btn-primary:hover {
  background-color: var(--primary-hover);
  filter: brightness(1.1);
  color: #111b21;
}

.btn-whatsapp {
  background-color: var(--accent-green);
  color: #111b21;
  border-color: var(--accent-green);
  box-shadow: 0 2px 10px rgba(37, 211, 102, 0.3);
}
.btn-whatsapp:hover {
  background-color: #20ba5a;
  filter: brightness(1.08);
  color: #111b21;
}

.btn-outline {
  background-color: transparent;
  color: var(--text);
  border-color: var(--border-light);
}
.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  background-color: rgba(0, 168, 132, 0.08);
}

.btn-sm {
  padding: 7px 15px;
  font-size: 12px;
  border-radius: var(--radius-pill);
}

.btn-block {
  display: flex;
  width: 100%;
}

/* ==========================================================================
   TAGS DE PLACEHOLDER (QUEBRA SEGURA EM QUALQUER LARGURA)
   ========================================================================== */
.placeholder-tag {
  display: inline-block;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-all;
  white-space: normal;
  background: rgba(245, 158, 11, 0.15);
  border: 1px dashed #f59e0b;
  color: #fbbf24;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.88em;
  vertical-align: baseline;
  line-height: 1.3;
}

/* ==========================================================================
   CONTEÚDO PRINCIPAL & HERO
   ========================================================================== */
.main-content {
  flex: 1;
  padding-top: 1.75rem;
  padding-bottom: 3.5rem;
  width: 100%;
  box-sizing: border-box;
}

.page-hero {
  text-align: center;
  padding: 1.5rem 0 2.25rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
  position: relative;
  width: 100%;
  box-sizing: border-box;
}

.page-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(320px, 90vw);
  height: 120px;
  background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.page-hero h1 {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.page-hero .subtitle {
  position: relative;
  z-index: 1;
  color: var(--text-sec);
  font-size: clamp(0.95rem, 3.5vw, 1.08rem);
  max-width: 650px;
  margin: 0 auto;
}

.badge-app {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 168, 132, 0.12);
  border: 1px solid rgba(0, 168, 132, 0.3);
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 0.85rem;
  max-width: 100%;
  overflow-wrap: anywhere;
}

/* ==========================================================================
   CARDS DE DOCUMENTOS LEGAIS (IGUAL AOS PAINÉIS DO APP)
   ========================================================================== */
.legal-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  margin-bottom: 1.5rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

@media (min-width: 768px) {
  .legal-card {
    padding: 2.25rem;
  }
}

.legal-section {
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  width: 100%;
  box-sizing: border-box;
}
.legal-section:last-child {
  padding-bottom: 0;
  margin-bottom: 0;
  border-bottom: none;
}

.legal-section h2 {
  color: #fff;
  font-size: clamp(1.15rem, 3.8vw, 1.35rem);
  margin-top: 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.legal-section h2 .sec-num {
  color: var(--primary);
  font-weight: 800;
}

/* ==========================================================================
   CALLOUTS & ALERTAS (DESIGN CONSISTENTE COM O APP)
   ========================================================================== */
.callout {
  padding: 14px 14px;
  border-radius: var(--radius-md);
  margin: 1rem 0;
  border-left: 4px solid;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-wrap: anywhere;
  word-break: normal;
}

@media (min-width: 768px) {
  .callout {
    padding: 16px 20px;
  }
}

.callout-info {
  background: rgba(0, 168, 132, 0.08);
  border-color: var(--primary);
  color: #d1d7db;
}
.callout-warning {
  background: rgba(245, 158, 11, 0.1);
  border-color: var(--warning);
  color: #fde68a;
}
.callout-danger {
  background: rgba(239, 83, 80, 0.12);
  border-color: var(--danger);
  color: #fca5a5;
}

.callout h4 {
  margin-top: 0;
  margin-bottom: 0.4rem;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.callout-danger h4 { color: #f87171; }
.callout-warning h4 { color: #f59e0b; }
.callout-info h4 { color: var(--primary); }

/* ==========================================================================
   GRID DE SUPORTE E CONTATO
   ========================================================================== */
.support-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 2rem;
  width: 100%;
  box-sizing: border-box;
}

@media (min-width: 680px) {
  .support-grid {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
}

.contact-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 16px;
  text-align: center;
  transition: transform 0.2s ease, border-color 0.2s ease;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.contact-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
}

.contact-icon {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-md);
  background: rgba(0, 168, 132, 0.12);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
  flex-shrink: 0;
}
.contact-icon.whatsapp {
  background: rgba(37, 211, 102, 0.15);
  color: var(--accent-green);
}

.contact-card h3 {
  margin-top: 0;
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}
.contact-card p {
  color: var(--text-sec);
  font-size: 0.88rem;
  margin-bottom: 1.25rem;
  flex: 1;
}

/* ==========================================================================
   FAQ ACCORDION
   ========================================================================== */
.faq-category {
  margin-bottom: 2rem;
  width: 100%;
}
.faq-category:last-child {
  margin-bottom: 0;
}

.faq-category-title {
  font-size: clamp(1.15rem, 3.8vw, 1.3rem);
  color: #fff;
  border-left: 3px solid var(--primary);
  padding-left: 10px;
  margin-bottom: 1rem;
}

.faq-item {
  background: var(--card-inner);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 0.65rem;
  overflow: hidden;
  transition: border-color 0.2s ease;
  width: 100%;
  box-sizing: border-box;
}
.faq-item:hover {
  border-color: var(--border-light);
}
.faq-item.active {
  border-color: var(--primary);
}

.faq-question {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  gap: 10px;
  box-sizing: border-box;
  font-family: inherit;
}
.faq-question:hover {
  color: #fff;
}
.faq-question span:first-child {
  flex: 1;
  overflow-wrap: anywhere;
}

.faq-toggle-icon {
  font-size: 0.9rem;
  color: var(--primary);
  transition: transform 0.25s ease;
  flex-shrink: 0;
}
.faq-item.active .faq-toggle-icon {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
  padding: 0 16px;
  color: #c0c6c9;
  font-size: 0.9rem;
  border-top: 0 solid var(--border);
  box-sizing: border-box;
}
.faq-item.active .faq-answer {
  max-height: 900px;
  padding: 0 16px 14px;
  border-top: 1px solid var(--border);
}

/* ==========================================================================
   GRID DE RECURSOS (INDEX)
   ========================================================================== */
.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin: 2rem 0;
  width: 100%;
  box-sizing: border-box;
}

@media (min-width: 600px) {
  .features-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
  }
}

.feature-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem 16px;
  transition: transform 0.2s ease, border-color 0.2s ease;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.feature-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
}

.feature-icon {
  font-size: 1.6rem;
  margin-bottom: 0.75rem;
  display: inline-block;
}
.feature-card h3 {
  margin-top: 0;
  font-size: 1.1rem;
  color: #fff;
  margin-bottom: 0.4rem;
}
.feature-card p {
  color: var(--text-sec);
  font-size: 0.88rem;
  margin-bottom: 0;
}

/* ==========================================================================
   RODAPÉ (IDÊNTICO AO TEMA DARK DO APP)
   ========================================================================== */
.footer {
  background: var(--bg-panel);
  border-top: 1px solid var(--border);
  padding: 2.25rem 0 1.5rem;
  color: var(--text-sec);
  font-size: 0.85rem;
  width: 100%;
  box-sizing: border-box;
}

.footer-top {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
  margin-bottom: 2rem;
  width: 100%;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .footer-top {
    grid-template-columns: 2fr 1fr 1fr;
    gap: 2rem;
  }
}

.footer-col {
  width: 100%;
  box-sizing: border-box;
}
.footer-col h4 {
  color: #fff;
  font-size: 0.92rem;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-links li {
  margin-bottom: 0.4rem;
}
.footer-links a {
  color: var(--text-sec);
}
.footer-links a:hover {
  color: var(--primary);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-size: 0.8rem;
  width: 100%;
  box-sizing: border-box;
}

@media (min-width: 600px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}
