/* NowDev UI v1.3.1 — ND136: o primeiro card de conteúdo é azul em todas as páginas. */

/*
 * Esta camada corrige a especificidade das folhas anteriores. O uso de :is()
 * mantém a classe do componente no cálculo de especificidade; :where(), usado
 * na ND135, perdia para regras antigas com !important em alguns módulos.
 */
body.nf-redesign :is(
  .module-hero,
  .dashboard-hero,
  .suite-hero,
  .support-hero,
  .intelligent-hero,
  .page-header,
  .settings-hub-hero,
  .profile-hero,
  .hero-card
),
body.nf-redesign .page-stack > :is(.page-head,.commerce-page-head):first-child,
body.nf-redesign .dashboard-order-layout > .quick-actions-strip:first-child,
body.legal-body-public .legal-page-public > .legal-center-shell:first-child {
  position: relative !important;
  isolation: isolate;
  box-sizing: border-box !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  min-height: clamp(202px, 16vw, 252px) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: wrap !important;
  gap: 24px !important;
  margin: 0 0 24px !important;
  padding: clamp(32px, 4vw, 50px) !important;
  overflow: hidden !important;
  border: 1px solid var(--nd-primary-hero-border) !important;
  border-radius: 32px !important;
  color: #fff !important;
  background-color: #1861f1 !important;
  background-image: var(--nd-primary-hero-gradient) !important;
  box-shadow: var(--nd-primary-hero-shadow) !important;
}

body.nf-redesign :is(
  .module-hero,
  .dashboard-hero,
  .suite-hero,
  .support-hero,
  .intelligent-hero,
  .page-header,
  .settings-hub-hero,
  .profile-hero,
  .hero-card
)::before,
body.nf-redesign :is(
  .module-hero,
  .dashboard-hero,
  .suite-hero,
  .support-hero,
  .intelligent-hero,
  .page-header,
  .settings-hub-hero,
  .profile-hero,
  .hero-card
)::after,
body.nf-redesign .page-stack > :is(.page-head,.commerce-page-head):first-child::before,
body.nf-redesign .page-stack > :is(.page-head,.commerce-page-head):first-child::after,
body.nf-redesign .dashboard-order-layout > .quick-actions-strip:first-child::before,
body.nf-redesign .dashboard-order-layout > .quick-actions-strip:first-child::after,
body.legal-body-public .legal-page-public > .legal-center-shell:first-child::before,
body.legal-body-public .legal-page-public > .legal-center-shell:first-child::after {
  content: none !important;
  display: none !important;
}

body.nf-redesign :is(
  .module-hero,
  .dashboard-hero,
  .suite-hero,
  .support-hero,
  .intelligent-hero,
  .page-header,
  .settings-hub-hero,
  .profile-hero,
  .hero-card
) > *,
body.nf-redesign .page-stack > :is(.page-head,.commerce-page-head):first-child > *,
body.nf-redesign .dashboard-order-layout > .quick-actions-strip:first-child > *,
body.legal-body-public .legal-page-public > .legal-center-shell:first-child > * {
  position: relative !important;
  z-index: 1 !important;
  min-width: 0 !important;
}

body.nf-redesign :is(
  .module-hero,
  .dashboard-hero,
  .suite-hero,
  .support-hero,
  .intelligent-hero,
  .page-header,
  .settings-hub-hero,
  .profile-hero,
  .hero-card
) :is(h1,h2,h3,strong),
body.nf-redesign .page-stack > :is(.page-head,.commerce-page-head):first-child :is(h1,h2,h3,strong),
body.nf-redesign .dashboard-order-layout > .quick-actions-strip:first-child :is(h1,h2,h3,strong),
body.legal-body-public .legal-page-public > .legal-center-shell:first-child :is(h1,h2,h3,strong) {
  color: #fff !important;
  text-shadow: none !important;
  -webkit-text-stroke: 0 !important;
  opacity: 1 !important;
}

body.nf-redesign :is(
  .module-hero,
  .dashboard-hero,
  .suite-hero,
  .support-hero,
  .intelligent-hero,
  .page-header,
  .settings-hub-hero,
  .profile-hero,
  .hero-card
) :is(h1,h2),
body.nf-redesign .page-stack > :is(.page-head,.commerce-page-head):first-child :is(h1,h2),
body.nf-redesign .dashboard-order-layout > .quick-actions-strip:first-child :is(h1,h2),
body.legal-body-public .legal-page-public > .legal-center-shell:first-child :is(h1,h2) {
  margin: 5px 0 10px !important;
  font-size: clamp(34px, 3.4vw, 48px) !important;
  font-weight: 800 !important;
  line-height: 1.08 !important;
  letter-spacing: -1.35px !important;
}

body.nf-redesign :is(
  .module-hero,
  .dashboard-hero,
  .suite-hero,
  .support-hero,
  .intelligent-hero,
  .page-header,
  .settings-hub-hero,
  .profile-hero,
  .hero-card
) :is(.muted,p:not(.page-kicker),small),
body.nf-redesign .page-stack > :is(.page-head,.commerce-page-head):first-child :is(.muted,p:not(.page-kicker),small),
body.nf-redesign .dashboard-order-layout > .quick-actions-strip:first-child :is(.muted,p:not(.page-kicker),small),
body.legal-body-public .legal-page-public > .legal-center-shell:first-child :is(.muted,p:not(.page-kicker),small) {
  color: var(--nd-primary-hero-muted) !important;
}

body.nf-redesign :is(
  .module-hero,
  .dashboard-hero,
  .suite-hero,
  .support-hero,
  .intelligent-hero,
  .page-header,
  .settings-hub-hero,
  .profile-hero,
  .hero-card
) .page-kicker,
body.nf-redesign .page-stack > :is(.page-head,.commerce-page-head):first-child .page-kicker,
body.nf-redesign .dashboard-order-layout > .quick-actions-strip:first-child .page-kicker,
body.legal-body-public .legal-page-public > .legal-center-shell:first-child .page-kicker {
  color: #bffcff !important;
}

body.nf-redesign :is(
  .module-hero,
  .dashboard-hero,
  .suite-hero,
  .support-hero,
  .intelligent-hero,
  .page-header,
  .settings-hub-hero,
  .profile-hero,
  .hero-card
) :is(.btn-primary,.btn-outline,.btn-ghost,.btn.ghost,.btn-light,.btn-hero-outline),
body.nf-redesign .page-stack > :is(.page-head,.commerce-page-head):first-child :is(.btn-primary,.btn-outline,.btn-ghost,.btn.ghost,.btn-light,.btn-hero-outline),
body.nf-redesign .dashboard-order-layout > .quick-actions-strip:first-child :is(.btn-primary,.btn-outline,.btn-ghost,.btn.ghost),
body.legal-body-public .legal-page-public > .legal-center-shell:first-child :is(.btn-primary,.btn-outline,.btn-ghost,.btn.ghost) {
  border-color: rgba(255,255,255,.58) !important;
}

body.nf-redesign :is(
  .module-hero,
  .dashboard-hero,
  .suite-hero,
  .support-hero,
  .intelligent-hero,
  .page-header,
  .settings-hub-hero,
  .profile-hero,
  .hero-card
) :is(.btn-primary,.btn-light),
body.nf-redesign .page-stack > :is(.page-head,.commerce-page-head):first-child :is(.btn-primary,.btn-light),
body.nf-redesign .dashboard-order-layout > .quick-actions-strip:first-child .btn-primary {
  color: #0d4cab !important;
  background: #fff !important;
  box-shadow: 0 12px 28px rgba(3,30,80,.2) !important;
}

body.nf-redesign :is(
  .module-hero,
  .dashboard-hero,
  .suite-hero,
  .support-hero,
  .intelligent-hero,
  .page-header,
  .settings-hub-hero,
  .profile-hero,
  .hero-card
) :is(.btn-outline,.btn-ghost,.btn.ghost,.btn-hero-outline),
body.nf-redesign .page-stack > :is(.page-head,.commerce-page-head):first-child :is(.btn-outline,.btn-ghost,.btn.ghost,.btn-hero-outline),
body.nf-redesign .dashboard-order-layout > .quick-actions-strip:first-child :is(.btn-outline,.btn-ghost,.btn.ghost),
body.legal-body-public .legal-page-public > .legal-center-shell:first-child :is(.btn-outline,.btn-ghost,.btn.ghost) {
  color: #fff !important;
  background: rgba(4,35,91,.24) !important;
}

/* Cards internos especiais do próprio cabeçalho usam vidro; os cards inferiores não entram aqui. */
body.nf-redesign :is(.intelligent-hero,.profile-hero) :is(
  .smart-highlight-card,
  .business-health-gauge,
  .profile-completion-card,
  .isf-pill
) {
  color: #fff !important;
  border-color: rgba(255,255,255,.26) !important;
  background: rgba(4,35,91,.22) !important;
  box-shadow: none !important;
  backdrop-filter: blur(12px);
}

/* Layouts independentes seguem o mesmo padrão sem atingir recibos ou cards operacionais. */
body:is(.support-staff-body,.support-portal-body) .support-staff-hero,
body.pdv-terminal-body .pdv-workstation-header {
  color: #fff !important;
  border-color: var(--nd-primary-hero-border) !important;
  background-color: #1861f1 !important;
  background-image: var(--nd-primary-hero-gradient) !important;
  box-shadow: var(--nd-primary-hero-shadow) !important;
}

body:is(.support-staff-body,.support-portal-body) .support-staff-hero :is(h1,h2,h3,strong),
body.pdv-terminal-body .pdv-workstation-header :is(h1,h2,h3,strong) {
  color: #fff !important;
}

body:is(.support-staff-body,.support-portal-body) .support-staff-hero :is(p,small,.muted),
body.pdv-terminal-body .pdv-workstation-header :is(p,small,.muted) {
  color: var(--nd-primary-hero-muted) !important;
}

@media (max-width: 720px) {
  body.nf-redesign :is(
    .module-hero,
    .dashboard-hero,
    .suite-hero,
    .support-hero,
    .intelligent-hero,
    .page-header,
    .settings-hub-hero,
    .profile-hero,
    .hero-card
  ),
  body.nf-redesign .page-stack > :is(.page-head,.commerce-page-head):first-child,
  body.nf-redesign .dashboard-order-layout > .quick-actions-strip:first-child,
  body.legal-body-public .legal-page-public > .legal-center-shell:first-child {
    min-height: 0 !important;
    display: block !important;
    padding: 25px !important;
    border-radius: 23px !important;
  }

  body.nf-redesign :is(
    .module-hero,
    .dashboard-hero,
    .suite-hero,
    .support-hero,
    .intelligent-hero,
    .page-header,
    .settings-hub-hero,
    .profile-hero,
    .hero-card
  ) :is(h1,h2),
  body.nf-redesign .page-stack > :is(.page-head,.commerce-page-head):first-child :is(h1,h2),
  body.nf-redesign .dashboard-order-layout > .quick-actions-strip:first-child :is(h1,h2),
  body.legal-body-public .legal-page-public > .legal-center-shell:first-child :is(h1,h2) {
    font-size: clamp(29px, 9vw, 37px) !important;
  }

  body.nf-redesign :is(.hero-actions,.commerce-head-actions,.quick-actions-buttons) {
    width: 100%;
    margin-top: 17px !important;
  }
}

@media print {
  body.pdv-terminal-body .pdv-workstation-header { display: none !important; }
}
