* {
  box-sizing: border-box;
}

:root {
  --fundo: #07111f;
  --fundo-2: #0f172a;
  --card: rgba(255, 255, 255, 0.07);
  --card-forte: rgba(255, 255, 255, 0.11);
  --borda: rgba(255, 255, 255, 0.13);
  --texto: #f8fafc;
  --texto-suave: #a8b3c7;
  --verde: #22c55e;
  --verde-escuro: #052e16;
  --azul: #38bdf8;
  --sombra: 0 30px 90px rgba(0, 0, 0, 0.35);
  --raio: 28px;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(34, 197, 94, 0.22), transparent 34%),
    radial-gradient(circle at 82% 10%, rgba(56, 189, 248, 0.18), transparent 30%),
    linear-gradient(180deg, var(--fundo), var(--fundo-2));
  color: var(--texto);
  line-height: 1.6;
}

a {
  color: inherit;
}

.topo {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(7, 17, 31, 0.9);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--borda);
}

.nav {
  width: min(1180px, calc(100% - 32px));
  min-height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  color: var(--verde);
  font-weight: 900;
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 16px;
  color: var(--texto-suave);
  font-size: 0.94rem;
  font-weight: 800;
}

.nav-links a {
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--texto);
}

.hero,
.painel {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  padding: 86px 0 48px;
}

.tag {
  margin: 0 0 14px;
  color: var(--verde);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 980px;
  margin-bottom: 24px;
  font-size: clamp(2.7rem, 7vw, 5.6rem);
  line-height: 0.94;
  letter-spacing: -0.08em;
}

.lead {
  max-width: 850px;
  color: var(--texto-suave);
  font-size: 1.16rem;
}

.painel {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 22px;
  padding-bottom: 42px;
}

.formulario,
.resultado-card {
  border: 1px solid var(--borda);
  border-radius: var(--raio);
  background: var(--card);
  box-shadow: var(--sombra);
}

.formulario {
  display: grid;
  gap: 16px;
  padding: 30px;
}

.grupo {
  display: grid;
  gap: 8px;
}

label {
  color: var(--texto-suave);
  font-weight: 900;
}

input,
textarea {
  width: 100%;
  min-height: 52px;
  padding: 14px 16px;
  border: 1px solid var(--borda);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--texto);
  font: inherit;
  font-weight: 800;
  outline: none;
}

textarea {
  min-height: 98px;
  resize: vertical;
}

input:focus,
textarea:focus {
  border-color: rgba(34, 197, 94, 0.75);
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.12);
}

button {
  min-height: 54px;
  border: 0;
  border-radius: 999px;
  background: var(--verde);
  color: var(--verde-escuro);
  cursor: pointer;
  font: inherit;
  font-weight: 900;
}

button:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.resultado-card {
  padding: 30px;
}

.resultado-topo {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.resultado-topo h2 {
  margin-bottom: 0;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  line-height: 1;
  letter-spacing: -0.055em;
}

#copiar {
  min-height: 44px;
  padding: 0 20px;
  background: var(--card-forte);
  color: var(--texto);
  border: 1px solid var(--borda);
}

pre {
  min-height: 560px;
  max-height: 760px;
  overflow: auto;
  margin: 0;
  padding: 18px;
  border: 1px solid var(--borda);
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.28);
  color: #d1fae5;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.92rem;
}

@media (max-width: 980px) {
  .painel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .nav {
    min-height: auto;
    padding: 18px 0;
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-links {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .hero,
  .painel {
    width: min(100% - 24px, 1180px);
  }

  .hero {
    padding: 54px 0 34px;
  }

  h1 {
    font-size: clamp(2.35rem, 14vw, 4.3rem);
  }

  .formulario,
  .resultado-card {
    padding: 22px;
  }

  .resultado-topo {
    flex-direction: column;
  }

  #copiar {
    width: 100%;
  }
}

/* INICIO-RESULTADO-VISUAL-CONSTRUTOR */
.resultado-visual {
  display: grid;
  gap: 16px;
}

.rv-vazio,
.rv-card {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: rgba(255,255,255,.055);
}

.rv-card.destaque {
  border-color: rgba(34,197,94,.45);
  background: linear-gradient(135deg, rgba(34,197,94,.16), rgba(56,189,248,.08));
}

.rv-card h3 {
  margin: 0 0 10px;
  color: #fff;
  font-size: 1.15rem;
}

.rv-card p,
.rv-card li {
  color: #d7e1f0;
  font-weight: 800;
}

.rv-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.rv-funcionarios {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.rv-func {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(0,0,0,.18);
}

.rv-func strong {
  display: block;
  color: #22c55e;
  margin-bottom: 6px;
}

.rv-lista {
  margin: 0;
  padding-left: 20px;
}

.rv-comando {
  overflow: auto;
  margin: 10px 0 0;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(0,0,0,.34);
  color: #d1fae5;
  font-size: .82rem;
  line-height: 1.55;
  white-space: pre;
}

.resultado-texto {
  margin-top: 16px;
  color: var(--muted);
  font-weight: 900;
}

.resultado-texto summary {
  cursor: pointer;
  margin-bottom: 12px;
}

.resultado-texto pre {
  min-height: 360px;
}

@media(max-width: 800px) {
  .rv-grid,
  .rv-funcionarios {
    grid-template-columns: 1fr;
  }
}
/* FIM-RESULTADO-VISUAL-CONSTRUTOR */

/* INICIO-CORRECAO-LAYOUT-CONSTRUTOR */
.painel {
  align-items: start;
  grid-template-columns: 360px minmax(0, 1fr);
}

.formulario {
  position: sticky;
  top: 96px;
  align-self: start;
}

.formulario button {
  width: 100%;
  min-height: 52px;
  padding: 0 18px;
  border-radius: 999px;
}

.resultado-card {
  min-width: 0;
  overflow: hidden;
}

.resultado-visual {
  width: 100%;
  min-width: 0;
}

.rv-card,
.rv-func,
.rv-comando,
.resultado-texto pre {
  min-width: 0;
}

.rv-card {
  overflow: hidden;
}

.rv-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.rv-funcionarios {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.rv-comando {
  width: 100%;
  max-width: 100%;
  white-space: pre-wrap;
  word-break: break-word;
}

.resultado-texto pre {
  width: 100%;
  max-width: 100%;
  white-space: pre-wrap;
  word-break: break-word;
}

@media (max-width: 1050px) {
  .painel {
    grid-template-columns: 1fr;
  }

  .formulario {
    position: static;
  }
}

@media (max-width: 700px) {
  .rv-grid,
  .rv-funcionarios {
    grid-template-columns: 1fr;
  }
}
/* FIM-CORRECAO-LAYOUT-CONSTRUTOR */
