/* ReZapp v3 — cabeçalhos de seção. Somente o shell autenticado; sem regras para editor, login ou landing. */
html.rz-v1-ui {
  --rz-h-ink: #f0f4f5;
  --rz-h-muted: #a4b2b5;
  --rz-h-mint: #45e8bd;
  --rz-h-canvas: #06090c;
  --rz-h-title-size: clamp(28px, 3.1vw, 40px);
}

/* A renderização real do Dashboard v12 já era a referência aprovada. */
html.rz-v1-ui #rz-dashboard-redesign .rz-v1-eyebrow,
/* A linha de contexto nas seis páginas React nativas. */
html.rz-v1-ui[data-rz-v3-view="leads"] main > .space-y-4.relative > .flex.items-center.justify-between > div:first-child::before,
html.rz-v1-ui[data-rz-v3-view="tags"] main > div > div.mb-6::before,
html.rz-v1-ui[data-rz-v3-view="devices"] main > .space-y-6 > .flex.items-center.justify-between > div:first-child::before,
html.rz-v1-ui[data-rz-v3-view="webhooks"] main > .p-6.max-w-6xl > .flex.justify-between.items-center.mb-6 > div:first-child::before,
html.rz-v1-ui[data-rz-v3-view="subscription"] main > .space-y-6.max-w-6xl > .flex.items-center.justify-between > div:first-child::before,
html.rz-v1-ui[data-rz-v3-view="settings"] main > .space-y-6.max-w-2xl > div:first-child::before,
/* As seis telas injetadas já possuem linha de contexto visual: unificar estilo, sem criar outra. */
html.rz-v1-ui[data-rz-v3-view="flows"] main > .rz-v2-flows-list > div:first-child::before,
html.rz-v1-ui #rz-dispatches-overlay > div > div:first-child > div:first-child::before,
html.rz-v1-ui #rz-gatilhos-container > div:first-child > div::before,
html.rz-v1-ui #rz-notifications-page > div:first-child h1::before,
html.rz-v1-ui #rz-affiliate-page > div > div:first-child::before,
html.rz-v1-ui #rz-como-usar-page > div:first-child::before {
  display: block !important;
  width: fit-content;
  max-width: 100%;
  min-height: 15px;
  margin: 0 0 11px !important;
  padding: 0 0 0 19px !important;
  color: var(--rz-h-mint) !important;
  font-family: "Poppins", ui-sans-serif, system-ui, sans-serif;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: .16em !important;
  line-height: 1.35 !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: radial-gradient(circle 3.5px at 4px 7px, #00ffc8 98%, transparent 100%) no-repeat !important;
  text-shadow: none !important;
}

/* O Dashboard usa um marcador DOM real, não um pseudo-elemento. */
html.rz-v1-ui #rz-dashboard-redesign .rz-v1-eyebrow {display:flex !important;align-items:center;gap:12px;padding-left:0 !important;background:none !important;}
html.rz-v1-ui #rz-dashboard-redesign .rz-v1-eyebrow > span {width:7px;height:7px;box-shadow:0 0 0 5px rgba(0,255,200,.095),0 0 16px rgba(0,255,200,.45);}

/* Conteúdo contextual: apenas rótulos visuais, jamais substituem h1, acessibilidade ou campos reais. */
html.rz-v1-ui[data-rz-v3-view="leads"] main > .space-y-4.relative > .flex.items-center.justify-between > div:first-child::before {content:"OPERAÇÃO / LEADS";}
html.rz-v1-ui[data-rz-v3-view="tags"] main > div > div.mb-6::before {content:"ORGANIZAÇÃO / TAGS";}
html.rz-v1-ui[data-rz-v3-view="devices"] main > .space-y-6 > .flex.items-center.justify-between > div:first-child::before {content:"OPERAÇÃO / DISPOSITIVOS";}
html.rz-v1-ui[data-rz-v3-view="webhooks"] main > .p-6.max-w-6xl > .flex.justify-between.items-center.mb-6 > div:first-child::before {content:"INTEGRAÇÕES / WEBHOOKS";}
html.rz-v1-ui[data-rz-v3-view="subscription"] main > .space-y-6.max-w-6xl > .flex.items-center.justify-between > div:first-child::before {content:"CONTA / ASSINATURA";}
html.rz-v1-ui[data-rz-v3-view="settings"] main > .space-y-6.max-w-2xl > div:first-child::before {content:"CONTA / PREFERÊNCIAS";}
html.rz-v1-ui[data-rz-v3-view="flows"] main > .rz-v2-flows-list > div:first-child::before {content:"AUTOMAÇÕES / JORNADAS";}
html.rz-v1-ui #rz-dispatches-overlay > div > div:first-child > div:first-child::before {content:"OPERAÇÃO / FILA DE ENVIO";}
html.rz-v1-ui #rz-gatilhos-container > div:first-child > div::before {content:"AUTOMAÇÕES / GATILHOS";}
html.rz-v1-ui #rz-notifications-page > div:first-child h1::before {content:"CONTA / ALERTAS";}
html.rz-v1-ui #rz-affiliate-page > div > div:first-child::before {content:"CONTA / PARCERIAS";}
html.rz-v1-ui #rz-como-usar-page > div:first-child::before {content:"CONTA / GUIA";}

/* A mesma escala do Dashboard, aplicada SOMENTE ao h1 de cada tela; nunca a h2/h3 internos. */
html.rz-v1-ui #rz-dashboard-redesign .rz-v1-heading h1,
html.rz-v1-ui[data-rz-v3-view="flows"] main > .rz-v2-flows-list > div:first-child h1,
html.rz-v1-ui[data-rz-v3-view="leads"] main > .space-y-4.relative > .flex.items-center.justify-between > div:first-child > h1,
html.rz-v1-ui[data-rz-v3-view="tags"] main > div > div.mb-6 > h1,
html.rz-v1-ui[data-rz-v3-view="devices"] main > .space-y-6 > .flex.items-center.justify-between > div:first-child > h1,
html.rz-v1-ui[data-rz-v3-view="webhooks"] main > .p-6.max-w-6xl > .flex.justify-between.items-center.mb-6 > div:first-child > h1,
html.rz-v1-ui[data-rz-v3-view="subscription"] main > .space-y-6.max-w-6xl > .flex.items-center.justify-between > div:first-child > h1,
html.rz-v1-ui[data-rz-v3-view="settings"] main > .space-y-6.max-w-2xl > div:first-child > h1,
html.rz-v1-ui #rz-dispatches-overlay > div > div:first-child h1,
html.rz-v1-ui #rz-gatilhos-container > div:first-child h1,
html.rz-v1-ui #rz-notifications-page > div:first-child h1,
html.rz-v1-ui #rz-affiliate-page > div > div:first-child h1,
html.rz-v1-ui #rz-como-usar-page > div:first-child h1 {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  color: var(--rz-h-ink) !important;
  font-family: "Poppins", ui-sans-serif, system-ui, sans-serif !important;
  font-size: var(--rz-h-title-size) !important;
  font-weight: 700 !important;
  letter-spacing: -.045em !important;
  line-height: 1.2 !important;
}

/* Subtítulos existentes continuam dinâmicos, inclusive contagem de leads. */
html.rz-v1-ui #rz-dashboard-redesign .rz-v1-heading h1 + p,
html.rz-v1-ui[data-rz-v3-view="flows"] main > .rz-v2-flows-list > div:first-child h1 + p,
html.rz-v1-ui[data-rz-v3-view="leads"] main > .space-y-4.relative > .flex.items-center.justify-between > div:first-child > h1 + p,
html.rz-v1-ui[data-rz-v3-view="tags"] main > div > div.mb-6 > h1 + p,
html.rz-v1-ui[data-rz-v3-view="devices"] main > .space-y-6 > .flex.items-center.justify-between > div:first-child > h1 + p,
html.rz-v1-ui[data-rz-v3-view="webhooks"] main > .p-6.max-w-6xl > .flex.justify-between.items-center.mb-6 > div:first-child > h1 + p,
html.rz-v1-ui[data-rz-v3-view="subscription"] main > .space-y-6.max-w-6xl > .flex.items-center.justify-between > div:first-child > h1 + p,
html.rz-v1-ui[data-rz-v3-view="settings"] main > .space-y-6.max-w-2xl > div:first-child > h1 + p,
html.rz-v1-ui #rz-dispatches-overlay > div > div:first-child h1 + p,
html.rz-v1-ui #rz-gatilhos-container > div:first-child h1 + p,
html.rz-v1-ui #rz-notifications-page > div:first-child h1 + p,
html.rz-v1-ui #rz-affiliate-page > div > div:first-child h1 + p,
html.rz-v1-ui #rz-como-usar-page > div:first-child h1 + p {
  margin: 11px 0 0 !important;
  max-width: 710px;
  color: var(--rz-h-muted) !important;
  font-family: "Poppins", ui-sans-serif, system-ui, sans-serif !important;
  font-size: 14px !important;
  font-weight: 400;
  line-height: 1.55 !important;
}

/* Cabeçalho de Fluxos com topo 104px do shell: o texto começa na mesma faixa das telas nativas. */
html.rz-v1-ui[data-rz-v3-view="flows"] main > .rz-v2-flows-list > div:first-child {
  gap: 0 !important;
  padding: 2px 0 0 !important;
  border-bottom: 0 !important;
  margin-bottom: 26px;
}
html.rz-v1-ui[data-rz-v3-view="flows"] main > .rz-v2-flows-list > div:first-child::after {display:none !important;}
html.rz-v1-ui #rz-dispatches-overlay > div > div:first-child,
html.rz-v1-ui #rz-como-usar-page > div:first-child {border-bottom:0 !important;}
html.rz-v1-ui #rz-dispatches-overlay > div > div:first-child > div:first-child::after,
html.rz-v1-ui #rz-notifications-page > div:first-child h1::after,
html.rz-v1-ui #rz-como-usar-page > div:first-child::after {display:none !important;}
html.rz-v1-ui #rz-notifications-page > div:first-child h1 {display:block !important;}

/* Compensar o padding editorial legado de algumas telas: título ~130 px no desktop,
   ~108 px com a barra móvel, sem alterar geometria de modais ou filtros. */
html.rz-v1-ui[data-rz-v3-view="webhooks"] main > .p-6.max-w-6xl {padding-top:0 !important;}
html.rz-v1-ui #rz-dispatches-overlay {padding-top:33px !important;}
html.rz-v1-ui #rz-notifications-page {padding-top:59px !important;}
html.rz-v1-ui #rz-como-usar-page > div:first-child {padding-top:33px !important;}

/* Espaçamento entre cabeçalho e controles/conteúdo sem mudar a posição relativa de CTA/filtros. */
html.rz-v1-ui[data-rz-v3-view="leads"] main > .space-y-4.relative > .flex.items-center.justify-between,
html.rz-v1-ui[data-rz-v3-view="tags"] main > div > div.mb-6,
html.rz-v1-ui[data-rz-v3-view="devices"] main > .space-y-6 > .flex.items-center.justify-between,
html.rz-v1-ui[data-rz-v3-view="webhooks"] main > .p-6.max-w-6xl > .flex.justify-between.items-center.mb-6,
html.rz-v1-ui[data-rz-v3-view="subscription"] main > .space-y-6.max-w-6xl > .flex.items-center.justify-between,
html.rz-v1-ui #rz-dashboard-redesign .rz-v1-heading,
html.rz-v1-ui #rz-dispatches-overlay > div > div:first-child,
html.rz-v1-ui #rz-gatilhos-container > div:first-child,
html.rz-v1-ui #rz-notifications-page > div:first-child,
html.rz-v1-ui #rz-affiliate-page > div > div:first-child {
  margin-bottom: 26px !important;
}

@media (max-width: 1080px) {
  html.rz-v1-ui #rz-como-usar-page > div:first-child {padding-top:21px !important;}
}
@media (max-width: 980px) {
  html.rz-v1-ui #rz-notifications-page {padding-top:47px !important;}
}
@media (max-width: 920px) {
  html.rz-v1-ui #rz-dispatches-overlay {padding-top:21px !important;}
}
@media (max-width: 720px) {
  html.rz-v1-ui #rz-notifications-page {padding-top:52px !important;}
}
@media (max-width: 700px) {
  html.rz-v1-ui #rz-como-usar-page > div:first-child {padding-top:26px !important;}
}

@media (max-width: 650px) {
  html.rz-v1-ui { --rz-h-title-size: 31px; }
  html.rz-v1-ui[data-rz-v3-view="webhooks"] main > .p-6.max-w-6xl {margin-top:-15px !important;}
  /* Fluxos, guia e overlays mantêm os mesmos breakpoints do shell móvel, sem cobrir CTA. */
  html.rz-v1-ui #rz-dashboard-redesign .rz-v1-heading h1 + p,
  html.rz-v1-ui[data-rz-v3-view="flows"] main > .rz-v2-flows-list > div:first-child h1 + p,
  html.rz-v1-ui[data-rz-v3-view="leads"] main > .space-y-4.relative > .flex.items-center.justify-between > div:first-child > h1 + p,
  html.rz-v1-ui[data-rz-v3-view="tags"] main > div > div.mb-6 > h1 + p,
  html.rz-v1-ui[data-rz-v3-view="devices"] main > .space-y-6 > .flex.items-center.justify-between > div:first-child > h1 + p,
  html.rz-v1-ui[data-rz-v3-view="webhooks"] main > .p-6.max-w-6xl > .flex.justify-between.items-center.mb-6 > div:first-child > h1 + p,
  html.rz-v1-ui[data-rz-v3-view="subscription"] main > .space-y-6.max-w-6xl > .flex.items-center.justify-between > div:first-child > h1 + p,
  html.rz-v1-ui[data-rz-v3-view="settings"] main > .space-y-6.max-w-2xl > div:first-child > h1 + p,
  html.rz-v1-ui #rz-dispatches-overlay > div > div:first-child h1 + p,
  html.rz-v1-ui #rz-gatilhos-container > div:first-child h1 + p,
  html.rz-v1-ui #rz-notifications-page > div:first-child h1 + p,
  html.rz-v1-ui #rz-affiliate-page > div > div:first-child h1 + p,
  html.rz-v1-ui #rz-como-usar-page > div:first-child h1 + p {font-size:12px !important;}
}
@media (max-width: 460px) {
  html.rz-v1-ui #rz-notifications-page {padding-top:47px !important;}
}
@media (max-width: 420px) {
  html.rz-v1-ui #rz-como-usar-page > div:first-child {padding-top:21px !important;}
}
