:root {
  --navy: #1a233a;
  --navy-deep: #121a2c;
  --navy-mid: #2a3654;
  --teal: #14b8a6;
  --teal-dark: #0f766e;
  --teal-soft: #ccfbf1;
  --text: #1a233a;
  --muted: #5b657a;
  --line: #e4e8f0;
  --bg: #f7f9fc;
  --white: #ffffff;
  --radius: 14px;
  --shadow: 0 18px 50px rgba(26, 35, 58, 0.1);
  --font-display: "Sora", sans-serif;
  --font-body: "Manrope", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--white);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Marca: nunca herda max-width:100% (estoura o layout) */
img.nexa-mark {
  max-width: 24px !important;
  width: 24px !important;
  height: 24px !important;
  flex: 0 0 24px !important;
  object-fit: contain;
}

a {
  color: inherit;
  text-decoration: none;
}

.hidden {
  display: none !important;
}

.container {
  width: min(1120px, calc(100% - 40px));
  margin-inline: auto;
}

/* ----- Site chrome ----- */
.site-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 20;
  padding: 22px 0;
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.site-header-inner--nav-only {
  justify-content: flex-end;
}

.brand-link {
  flex-shrink: 0;
  text-decoration: none;
  color: inherit;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  line-height: 1;
  color: var(--navy);
}

.brand-name {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
  color: inherit;
  white-space: nowrap;
}

.brand-lockup--on-blue {
  color: #fff;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-link {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--navy-mid);
  padding: 8px 12px;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover {
  color: var(--navy);
  background: rgba(26, 35, 58, 0.05);
}

/* ----- Buttons ----- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 12px 22px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--navy);
  color: var(--white);
  box-shadow: 0 10px 28px rgba(26, 35, 58, 0.22);
}

.btn-primary:hover {
  background: var(--navy-deep);
}

.btn-accent {
  background: var(--teal);
  color: var(--navy-deep);
  box-shadow: 0 10px 28px rgba(20, 184, 166, 0.28);
}

.btn-accent:hover {
  background: #2dd4bf;
}

.btn-ghost {
  background: transparent;
  border-color: rgba(26, 35, 58, 0.18);
  color: var(--navy);
}

.btn-ghost:hover {
  background: rgba(26, 35, 58, 0.04);
}

.btn-sm {
  padding: 8px 14px;
  font-size: 0.9rem;
}

.btn-block {
  width: 100%;
}

.btn-danger {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #fecaca;
}

/* ----- Hero ----- */
.hero {
  /* Tamanho fixo pela altura — nao salta ao mudar largura */
  --wave-w: 132vh;
  --wave-h: 148vh;
  --wave-shift: 66%;
  --wave-y: 62%;
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  align-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 22%, rgba(20, 184, 166, 0.08), transparent 28%),
    linear-gradient(135deg, #ffffff 0%, #f4f7fb 48%, #eef3f9 100%);
}

.hero-network {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='160' height='160' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23c5cedd' stroke-width='1' opacity='0.45'%3E%3Ccircle cx='20' cy='30' r='2' fill='%23c5cedd'/%3E%3Ccircle cx='90' cy='18' r='2' fill='%23c5cedd'/%3E%3Ccircle cx='140' cy='70' r='2' fill='%23c5cedd'/%3E%3Ccircle cx='50' cy='110' r='2' fill='%23c5cedd'/%3E%3Ccircle cx='120' cy='130' r='2' fill='%23c5cedd'/%3E%3Cpath d='M20 30L90 18L140 70L50 110L20 30M90 18L50 110M140 70L120 130'/%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.55;
  pointer-events: none;
  z-index: 0;
}

/* Meia-lua ancorada na lateral direita — centro baixo/direita libera topo esquerdo */
.hero-wave {
  position: absolute;
  top: var(--wave-y);
  right: 0;
  width: var(--wave-w);
  height: var(--wave-h);
  margin: 0;
  background: var(--navy);
  border-radius: 50%;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
  transform: translate(var(--wave-shift), -50%);
}

.hero-wave::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 62% 32%, rgba(20, 184, 166, 0.14), transparent 58%),
    radial-gradient(ellipse 55% 45% at 78% 78%, rgba(42, 54, 84, 0.85), transparent 55%);
  pointer-events: none;
}

.hero-wave::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='140' height='140' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23344768' stroke-width='1'%3E%3Ccircle cx='24' cy='28' r='2.2' fill='%2314b8a6'/%3E%3Ccircle cx='88' cy='20' r='2.2' fill='%23344768'/%3E%3Ccircle cx='118' cy='78' r='2.2' fill='%2314b8a6'/%3E%3Ccircle cx='46' cy='104' r='2.2' fill='%23344768'/%3E%3Cpath d='M24 28L88 20L118 78L46 104L24 28'/%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.55;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1120px, calc(100% - 40px));
  max-width: 38rem;
  margin: 0;
  margin-left: max(20px, calc((100vw - 1120px) / 2));
  padding: 120px 20px 80px 0;
  box-sizing: border-box;
}

.hero-copy {
  position: relative;
  animation: rise-in 0.7s ease both;
}

.hero-copy-ink h1,
.hero-copy-light h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 3.8vw, 3.2rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.hero-copy-ink h1 {
  color: var(--navy);
}

.hero-copy-ink h1 .accent {
  color: var(--teal);
}

.hero-copy-ink .hero-lead,
.hero-copy-light .hero-lead {
  margin: 18px 0 0;
  max-width: 34rem;
  font-size: clamp(1.05rem, 2vw, 1.2rem);
}

.hero-copy-ink .hero-lead {
  color: var(--muted);
}

/* Overlay branco so no circulo azul; preto por baixo fica inteiro (sem corte) */
.hero-copy-light {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  pointer-events: none;
  clip-path: circle(0 at 100% 50%);
}

.hero-copy-light h1 {
  color: #fff;
}

.hero-copy-light h1 .accent {
  color: #5eead4;
}

.hero-copy-light .hero-lead {
  color: #f1f5f9;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
  animation: rise-in 0.75s ease 0.3s both;
  position: relative;
  z-index: 2;
}

/* Botoes opacos — nao somem sobre o azul */
.hero-actions .btn-ghost {
  background: #fff;
  border-color: rgba(26, 35, 58, 0.18);
  color: var(--navy);
  box-shadow: 0 6px 18px rgba(26, 35, 58, 0.08);
}

.hero-actions .btn-ghost:hover {
  background: #f8fafc;
}

.page-home .site-header {
  background: transparent;
  border-bottom: none;
  z-index: 20;
  padding: 16px 0;
}

.page-home .site-header-inner {
  align-items: flex-start;
}

.page-home .brand-link .nexa-mark {
  max-width: 28px !important;
  width: 28px !important;
  height: 28px !important;
  flex: 0 0 28px !important;
}

.page-home .brand-name {
  font-size: 1.05rem;
  font-weight: 600;
}

.page-home .site-nav {
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.page-home .nav-link {
  display: inline-flex;
  align-items: center;
  color: var(--navy);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 1px 4px rgba(26, 35, 58, 0.1);
  padding: 6px 12px;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.2;
  min-width: 9.5rem;
  text-align: center;
  justify-content: center;
}

.page-home .nav-link:hover {
  color: var(--navy);
  background: #fff;
}

.page-home .nav-link-cta {
  border: 1px solid rgba(26, 35, 58, 0.12);
}

.page-home .site-nav .btn-primary {
  background: var(--navy);
  color: var(--white);
  box-shadow: 0 8px 22px rgba(26, 35, 58, 0.28);
}

.page-home .site-nav .btn-primary:hover {
  background: var(--navy-deep);
  color: var(--white);
}

@media (min-width: 961px) {
  .page-home .site-nav {
    flex-direction: row;
    align-items: center;
    gap: 10px;
  }

  .page-home .nav-link {
    min-width: 0;
    padding: 8px 12px;
    font-size: 0.95rem;
  }
}

@keyframes brand-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ----- Sections ----- */
.section {
  padding: 88px 0;
}

.section-muted {
  background: var(--bg);
}

.section-head {
  max-width: 560px;
  margin-bottom: 40px;
}

.section-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  letter-spacing: -0.02em;
  color: var(--navy);
}

.section-head p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.pillars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}

.pillar {
  padding: 8px 4px;
}

.pillar-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 16px;
  color: var(--navy);
}

.pillar-icon svg {
  width: 100%;
  height: 100%;
}

.pillar h3 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--navy);
}

.pillar p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.cta-band {
  background: var(--navy);
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='140' height='140' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23344768' stroke-width='1'%3E%3Ccircle cx='24' cy='28' r='2' fill='%2314b8a6'/%3E%3Ccircle cx='88' cy='20' r='2' fill='%23344768'/%3E%3Ccircle cx='118' cy='78' r='2' fill='%2314b8a6'/%3E%3Cpath d='M24 28L88 20L118 78'/%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.55;
}

.cta-band .container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.cta-band h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  letter-spacing: -0.02em;
}

.cta-band p {
  margin: 8px 0 0;
  color: #cbd5e1;
  max-width: 36rem;
}

.site-footer {
  padding: 28px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
  margin-top: auto;
}

.site-footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}

.site-footer-inner--simple {
  justify-content: center;
  text-align: center;
}

.site-footer img {
  height: 28px;
  width: auto;
  max-width: none;
  object-fit: contain;
}

/* ----- Auth / app shell ----- */
.app-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 24px;
  background: var(--navy);
  color: var(--white);
}

.app-topbar .nexa-mark {
  width: 20px;
  height: 20px;
  flex-basis: 20px;
}

.app-topbar .brand-lockup {
  color: #fff;
}

.app-topbar .brand-name {
  font-size: 0.9rem;
}

.app-topbar-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.app-topbar-nav a {
  color: #cbd5e1;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 8px 12px;
  border-radius: 8px;
}

.app-topbar-nav a:hover,
.app-topbar-nav a.active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.app-topbar-user {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #cbd5e1;
  font-size: 0.9rem;
}

.user-menu {
  position: relative;
}

.user-menu-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  color: #e2e8f0;
  font: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 7px 12px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.user-menu-trigger:hover,
.user-menu-trigger[aria-expanded="true"] {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.35);
}

.user-menu-chevron {
  transition: transform 0.18s ease;
  opacity: 0.85;
}

.user-menu-trigger[aria-expanded="true"] .user-menu-chevron {
  transform: rotate(180deg);
}

.user-menu-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 160px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 6px;
  z-index: 40;
}

.user-menu-item {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--navy);
  font-weight: 600;
  font-size: 0.92rem;
}

.user-menu-item:hover {
  background: #f1f5f9;
}

.app-topbar .btn-ghost {
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
}

.app-main {
  width: min(960px, calc(100% - 40px));
  margin: 36px auto 80px;
}

.page-header {
  margin-bottom: 28px;
}

.page-header h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.8rem;
  letter-spacing: -0.02em;
}

.page-header p {
  margin: 8px 0 0;
  color: var(--muted);
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 20px;
  background:
    radial-gradient(circle at 80% 20%, rgba(20, 184, 166, 0.12), transparent 30%),
    linear-gradient(160deg, #f7f9fc, #eef3f9 60%, #e8eef7);
}

.auth-card {
  width: min(420px, 100%);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 32px 28px;
  box-shadow: var(--shadow);
}

.auth-card .brand-link {
  display: inline-block;
  margin-bottom: 20px;
}

.auth-card .nexa-mark {
  width: 28px;
  height: 28px;
}

.auth-card .brand-name {
  font-size: 1.08rem;
}

.auth-card h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.5rem;
}

.auth-card .auth-sub {
  margin: 6px 0 24px;
  color: var(--muted);
}

.auth-alt {
  margin: 18px 0 0;
  text-align: center;
  font-size: 0.92rem;
  color: var(--muted);
}

.auth-alt a {
  color: var(--navy);
  font-weight: 600;
}

.auth-card .flash-list {
  margin-bottom: 16px;
}

.form-stack {
  display: grid;
  gap: 14px;
}

.form-stack label {
  display: grid;
  gap: 6px;
  font-weight: 600;
  font-size: 0.92rem;
}

.form-stack input,
.form-stack textarea,
.form-stack select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 12px;
  font: inherit;
  background: #fff;
}

.form-stack input:focus,
.form-stack textarea:focus,
.form-stack select:focus {
  outline: 2px solid rgba(20, 184, 166, 0.35);
  border-color: var(--teal);
}

.form-erro {
  margin: 0;
  color: #b91c1c;
  font-size: 0.9rem;
}

.form-check {
  display: flex !important;
  align-items: center;
  gap: 8px;
  font-weight: 500 !important;
}

.form-check input {
  width: auto;
}

.flash-list {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.flash {
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.92rem;
}

.flash-ok {
  background: #ecfdf5;
  color: #065f46;
}

.flash-erro {
  background: #fef2f2;
  color: #991b1b;
}

/* Product cards — interaction containers */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}

.product-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.product-card h2,
.product-card h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.2rem;
}

.site-header--solid {
  position: relative;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}

.catalogo-section {
  padding-top: 48px;
  flex: 1 0 auto;
}

.app-main,
.auth-shell {
  flex: 1 0 auto;
}

.catalogo-grid {
  max-width: 520px;
}

.product-title {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35em;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.02em;
}

.product-title--lg {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.product-title-main {
  font-weight: 700;
}

.product-title-by {
  font-size: 0.72em;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0;
}

.product-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.product-kicker {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--teal-dark);
}

.product-card p {
  margin: 0;
  color: var(--muted);
  flex: 1;
}

.product-card .btn {
  align-self: flex-start;
}

.empty-state {
  text-align: center;
  padding: 48px 20px;
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

table.data th,
table.data td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

table.data th {
  background: var(--bg);
  font-weight: 700;
  color: var(--navy);
}

table.data tr:last-child td {
  border-bottom: none;
}

.badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
}

.badge-on {
  background: var(--teal-soft);
  color: var(--teal-dark);
}

.badge-ok {
  background: #dcfce7;
  color: #166534;
}

.badge-warn {
  background: #fef3c7;
  color: #92400e;
}

.badge-off {
  background: #f1f5f9;
  color: #64748b;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.liberacao-box {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  margin: 8px 0;
}

.liberacao-box legend {
  font-weight: 700;
  padding: 0 6px;
}

.admin-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

@media (max-width: 960px) {
  .pillars {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero {
    --wave-w: 126vh;
    --wave-h: 142vh;
    --wave-shift: 74%;
    --wave-y: 65%;
  }

  .hero-content {
    max-width: min(38rem, calc(100% - 40px));
  }
}

@media (max-width: 640px) {
  .hero {
    --wave-w: 118vh;
    --wave-h: 134vh;
    --wave-shift: 80%;
    --wave-y: 70%;
  }

  .pillars {
    grid-template-columns: 1fr;
  }

  .hero-content {
    padding-top: 100px;
    max-width: min(38rem, calc(100% - 40px));
  }

  .app-topbar {
    flex-wrap: wrap;
  }
}
