:root {
  --bg: #f3f7fa;
  --paper: #ffffff;
  --paper-2: #f7fbff;
  --text: #08283d;
  --muted: #516575;
  --line: #d7e3ec;
  --gold: #ff5a1f;
  --gold-2: #005a96;
  --danger: #b13b22;
  --ok: #00b979;
  --shadow: 0 18px 50px rgba(32, 24, 17, .10);
  --radius: 22px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(0, 183, 121, .13), transparent 34rem),
    radial-gradient(circle at top right, rgba(255, 90, 31, .12), transparent 30rem),
    linear-gradient(180deg, #f5f9fc 0%, var(--bg) 38%, #eaf2f7 100%);
  line-height: 1.6;
}

.container {
  width: min(1300px, calc(100% - 32px));
  margin: 0 auto;
}

header {
  padding: 42px 0 24px;
}

.hero {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: var(--text);
  border: 1px solid var(--line);
  border-top: 5px solid var(--gold-2);
  box-shadow: var(--shadow);
  border-radius: 30px;
  padding: clamp(28px, 5vw, 58px);
  position: relative;
  overflow: hidden;
}

.hero-logo-wrapper {
  margin-bottom: 24px;
}

.hero-logo {
  height: 140px;
  width: auto;
  display: block;
  transition: transform 0.3s ease;
}

.hero-logo:hover {
  transform: scale(1.04);
}

.hero h1 {
  color: var(--text);
}

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

.hero .notice {
  background: rgba(247, 251, 255, .92);
  border: 1px dashed var(--line);
  color: var(--muted);
}

.hero .eyebrow {
  color: var(--gold-2);
}


.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gold-2);
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: 12px;
  margin-bottom: 16px;
}

h1, h2, h3 {
  line-height: 1.15;
  margin: 0 0 14px;
  letter-spacing: -.02em;
}

h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(34px, 5vw, 66px);
  font-weight: 500;
}

h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(26px, 3vw, 42px);
  font-weight: 500;
  color: #005a96;
}

h3 {
  font-size: 20px;
  margin-top: 18px;
}

p {
  margin: 0 0 14px;
  color: var(--muted);
}

.lead {
  font-size: clamp(17px, 2vw, 21px);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

button, .btn {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 13px 18px;
  cursor: pointer;
  font-weight: 750;
  font-size: 15px;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

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

.btn-primary {
  background: linear-gradient(135deg, #ff5a1f, #ff7a35);
  color: white;
  box-shadow: 0 10px 24px rgba(255, 90, 31, .28);
}

.btn-secondary {
  background: #eaf4fb;
  color: var(--text);
  border: 1px solid var(--line);
}

.btn-copy {
  background: linear-gradient(135deg, #F7C948, #FF8C00);
  color: white;
  border: none;
  box-shadow: 0 8px 22px rgba(247, 180, 0, .32);
}

.btn-copy:hover {
  filter: brightness(1.07);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(247, 180, 0, .42);
}

#downloadTxt {
  background: linear-gradient(135deg, #00b979, #00d2c4);
  color: white;
  border: none;
  box-shadow: 0 10px 24px rgba(0, 185, 121, .25);
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}

#downloadTxt:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 185, 121, .38);
  filter: brightness(1.05);
}

.btn-ghost {
  background: transparent;
  color: var(--gold-2);
  border: 1px solid var(--line);
}

.btn-whatsapp {
  background: #25D366;
  color: #fff;
  border: none;
}

.btn-whatsapp:hover {
  background: #1ebe5c;
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(37, 211, 102, .35);
}

.notice {
  margin-top: 18px;
  background: rgba(247, 251, 255, .92);
  border: 1px dashed var(--line);
  border-radius: 18px;
  padding: 14px 16px;
  font-size: 14px;
  color: var(--muted);
}

.notice-save {
  background: rgba(0, 185, 121, .08);
  border: 1px solid rgba(0, 185, 121, .35);
  border-style: solid;
  color: var(--text);
}

.notice-save strong {
  color: #006c47;
}

/* Indicador "Salvo" flutuante */
.save-indicator {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #00b979;
  color: #fff;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 8px 22px rgba(0, 185, 121, .35);
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .25s ease, transform .25s ease;
  pointer-events: none;
  z-index: 500;
}

.save-indicator.show {
  opacity: 1;
  transform: translateY(0);
}

.save-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  display: inline-block;
}

/* ── BARRA DE NAVEGAÇÃO STICKY HORIZONTAL ── */
.topnav-bar {
  position: sticky;
  top: 0;
  z-index: 200;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 2px 16px rgba(8, 40, 61, 0.09);
}

.topnav-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
}

.topnav-inner nav {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 4px;
  flex: 1;
  scrollbar-width: none;
  padding: 2px 0;
}

.topnav-inner nav::-webkit-scrollbar { display: none; }

.topnav-inner nav a {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  color: var(--muted);
  text-decoration: none;
  padding: 6px 13px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid transparent;
  transition: background .15s, color .15s, border-color .15s;
  flex-shrink: 0;
}

.topnav-inner nav a:hover {
  color: var(--text);
  background: #eaf4fb;
  border-color: var(--line);
}

.topnav-inner nav a.active {
  background: var(--gold-2);
  color: #fff;
  font-weight: 700;
  border-color: var(--gold-2);
}

.topnav-inner nav a.completed {
  color: var(--ok);
  font-weight: 600;
}

.topnav-inner nav a.completed::after {
  content: " ✔";
  margin-left: 3px;
  font-size: 10px;
}

.topnav-inner nav a.completed.active {
  background: var(--ok);
  color: #fff;
  border-color: var(--ok);
}

.topnav-progress {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  min-width: 120px;
  flex-shrink: 0;
}

.progress-wrap {
  width: 120px;
  background: #dce9f2;
  height: 6px;
  border-radius: 999px;
  overflow: hidden;
}

.progress {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--gold-2), var(--ok));
  border-radius: inherit;
  transition: width .25s ease;
}

.progress-text {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
}

.topnav-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--muted);
  flex-shrink: 0;
  white-space: nowrap;
}

/* ── LAYOUT PRINCIPAL ── */
main {
  padding: 18px 0 70px;
}

form {
  display: grid;
  gap: 22px;
}

/* ── MODO WIZARD: uma etapa por vez ── */
body.wizard-mode form > section.card {
  display: none;
}

body.wizard-mode form > section.card.active {
  display: block;
  animation: fadeInUp .35s ease;
}

body.wizard-mode form > .preview {
  display: none;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.wizard-nav {
  display: none;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

body.wizard-mode section.card.active .wizard-nav {
  display: flex;
}

.wizard-nav .wizard-step-info {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}

.wizard-nav button {
  min-width: 130px;
}

.wizard-prev {
  background: #eaf4fb;
  color: var(--text);
  border: 1px solid var(--line);
}

.wizard-next {
  background: linear-gradient(135deg, var(--gold-2), #0a78b8);
  color: #fff;
  box-shadow: 0 8px 20px rgba(0, 90, 150, .25);
}

.wizard-next:hover {
  filter: brightness(1.07);
  box-shadow: 0 10px 26px rgba(0, 90, 150, .35);
}

/* Botão de alternar modo */
.mode-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

.mode-toggle:hover {
  background: #eaf4fb;
  color: var(--text);
}

section.card {
  background: rgba(255, 255, 255, .96);
  border: 1px solid var(--line);
  border-top: 4px solid #005a96;
  box-shadow: 0 12px 34px rgba(8, 40, 61, .07);
  border-radius: var(--radius);
  padding: clamp(20px, 3vw, 32px);
}

section.card:nth-of-type(3n) {
  border-top-color: #ff5a1f;
}

section.card:nth-of-type(3n + 1) {
  border-top-color: #00b979;
}

.section-intro {
  max-width: 800px;
  margin-bottom: 20px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.field {
  margin: 18px 0 6px;
}

label.title {
  display: block;
  font-weight: 800;
  margin-bottom: 8px;
  color: var(--text);
}

.help {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 10px;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 13px 14px;
  background: #ffffff;
  color: var(--text);
  font: inherit;
  outline: none;
}

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

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(163, 123, 69, .75);
  box-shadow: 0 0 0 4px rgba(255, 90, 31, .13);
}

.options {
  display: grid;
  gap: 10px;
  margin: 12px 0 4px;
}

.options.cols {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 12px;
  cursor: pointer;
  min-height: 48px;
}

.check:hover {
  background: #eef8ff;
}

.check input {
  margin-top: 4px;
  accent-color: #ff5a1f;
  min-width: 16px;
  min-height: 16px;
}

.check span {
  color: var(--text);
  font-size: 15px;
}

.required-note {
  color: var(--danger);
  font-size: 13px;
  margin-top: 6px;
}

.required-mark {
  color: var(--danger);
  font-weight: 900;
  margin-left: 2px;
}

/* ── MODAL DE BRIEFING INCOMPLETO ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 40, 61, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: modalFadeIn .2s ease;
}

.modal-overlay.show {
  display: flex;
}

.modal-box {
  background: #fff;
  border-radius: 22px;
  padding: 36px 32px 28px;
  max-width: 480px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 24px 70px rgba(8, 40, 61, 0.35);
  text-align: center;
  animation: modalSlideUp .25s ease;
  border-top: 6px solid var(--gold);
}

.modal-icon {
  font-size: 48px;
  line-height: 1;
  margin-bottom: 12px;
}

.modal-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 26px;
  color: var(--danger);
  margin: 0 0 12px;
  font-weight: 600;
}

.modal-text {
  color: var(--text);
  font-size: 15px;
  margin: 0 0 14px;
}

.modal-text-sm {
  color: var(--muted);
  font-size: 13px;
  margin: 14px 0 22px;
}

.modal-list {
  text-align: left;
  background: #fff8f3;
  border: 1px solid #ffd9c2;
  border-radius: 12px;
  padding: 14px 18px 14px 36px;
  margin: 0;
  color: var(--text);
  font-size: 14px;
  max-height: 240px;
  overflow-y: auto;
}

.modal-list li {
  margin: 4px 0;
}

.modal-btn {
  background: linear-gradient(135deg, var(--gold), #ff7a35);
  color: #fff;
  border: none;
  padding: 14px 28px;
  font-size: 15px;
  font-weight: 700;
  width: 100%;
  box-shadow: 0 8px 22px rgba(255, 90, 31, .3);
}

.modal-btn:hover {
  filter: brightness(1.06);
  box-shadow: 0 10px 26px rgba(255, 90, 31, .4);
}

.modal-box-danger {
  border-top-color: var(--danger);
}

.modal-title-danger {
  color: var(--danger);
}

.modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.modal-btn-secondary {
  background: #eaf4fb;
  color: var(--text);
  border: 1px solid var(--line);
  padding: 14px 20px;
  font-size: 15px;
  font-weight: 700;
  flex: 1;
}

.modal-btn-secondary:hover {
  background: #d8e8f4;
}

.modal-btn-danger {
  background: linear-gradient(135deg, var(--danger), #d04830);
  color: #fff;
  border: none;
  padding: 14px 20px;
  font-size: 15px;
  font-weight: 700;
  flex: 1;
  box-shadow: 0 8px 22px rgba(177, 59, 34, .3);
}

.modal-btn-danger:hover {
  filter: brightness(1.06);
  box-shadow: 0 10px 26px rgba(177, 59, 34, .4);
}

@media (max-width: 480px) {
  .modal-actions {
    flex-direction: column-reverse;
  }
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalSlideUp {
  from { opacity: 0; transform: translateY(20px) scale(.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.inline-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.status {
  display: none;
  border-radius: 16px;
  padding: 13px 15px;
  margin-top: 14px;
  font-weight: 700;
}

.status.ok {
  display: block;
  background: rgba(70, 105, 76, .10);
  color: var(--ok);
  border: 1px solid rgba(70, 105, 76, .25);
}

.status.err {
  display: block;
  background: rgba(138, 61, 47, .10);
  color: var(--danger);
  border: 1px solid rgba(138, 61, 47, .25);
}

.footer-actions {
  background: rgba(255, 255, 255, .97);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: stretch;
}


.send-block {
  flex: 1;
  min-width: 240px;
  padding: 20px 24px;
  background: #f0f8ff;
  border-radius: 14px;
  border: 1px solid #c8dff2;
}

.send-block-primary {
  background: #f0f8ff;
  border-radius: 14px;
  border: 1px solid #c8dff2;
}

.send-block-footer {
  width: 100%;
  padding: 16px 4px 0;
  border-top: 1px solid var(--line);
  margin-top: 16px;
  display: flex;
  justify-content: flex-end;
}

.send-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}

.send-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
}

.send-buttons button {
  width: 100%;
}

.send-tag {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--gold-2);
  margin-bottom: 6px;
}

.send-steps {
  margin: 10px 0 4px;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.send-steps li {
  font-size: 13px;
  color: var(--text);
  line-height: 1.5;
}

@media (max-width: 600px) {
  .send-divider {
    width: 100%;
    padding: 12px 0;
  }
}

.small {
  font-size: 13px;
  color: var(--muted);
}

.preview {
  white-space: pre-wrap;
  background: #06283d;
  color: #f4fbff;
  border-radius: 18px;
  padding: 18px;
  overflow: auto;
  max-height: 460px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  display: none;
}

.preview.show {
  display: block;
}


@media (max-width: 940px) {
  header {
    padding: 20px 0 12px;
  }

  .hero {
    padding: 24px 20px;
    border-radius: 20px;
  }

  .topnav-bar {
    border-radius: 0;
  }

  .topnav-inner {
    padding: 8px 16px;
    gap: 10px;
  }

  .topnav-inner nav a {
    padding: 5px 10px;
    background: var(--bg);
    border: 1px solid var(--line);
    font-size: 12px;
    border-radius: 8px;
  }

  .topnav-progress {
    min-width: 80px;
  }

  .progress-wrap {
    width: 80px;
    margin: 0;
    height: 5px;
  }

  .progress-text {
    font-size: 10px;
    font-weight: 600;
    text-align: right;
  }


  /* Evita o zoom involuntário automático do Safari/Chrome no iOS ao focar em campos de texto */
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="url"],
  textarea,
  select {
    font-size: 16px !important;
  }

  section.card {
    padding: 20px 16px;
    border-radius: 18px;
  }

  .grid-2, .grid-3, .options.cols, .inline-fields {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }

  .actions {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 10px;
  }

  button, .btn {
    width: 100%;
    padding: 14px 18px;
    font-size: 16px;
  }

  .wizard-nav {
    flex-direction: column-reverse;
    gap: 10px;
  }

  .wizard-nav button {
    width: 100%;
  }

  .wizard-nav .wizard-step-info {
    order: -1;
  }

  .footer-actions {
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    gap: 16px;
    text-align: center;
  }

  .footer-actions .actions {
    margin-top: 0;
  }
}

/* ── PALETAS DE CORES ── */
.palette-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
  margin-top: 10px;
}

.palette-option {
  position: relative;
  cursor: pointer;
  display: block;
}

.palette-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.palette-card {
  background: white;
  border: 2px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  transition: border-color .2s ease, box-shadow .2s ease, transform .15s ease;
}

.palette-preview {
  display: flex;
  height: 52px;
  border-radius: 0;
}

.palette-preview span {
  flex: 1;
}

.palette-body {
  padding: 14px 14px 12px;
}

.palette-option:hover .palette-card {
  border-color: #a0c4e0;
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(0, 90, 150, .12);
}

.palette-option input:checked + .palette-card {
  border-color: var(--gold-2);
  box-shadow: 0 6px 24px rgba(0, 90, 150, .2);
}

.palette-option input:checked + .palette-card .palette-body::after {
  content: "✔ Selecionada";
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--ok);
  margin-top: 6px;
  text-align: right;
}

.palette-name {
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 3px;
  color: var(--text);
  text-align: center;
}

.palette-desc {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 0;
  line-height: 1.4;
}

.palette-swatches {
  display: flex;
  gap: 5px;
  margin-top: 10px;
}

.swatch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.9);
  box-shadow: 0 1px 4px rgba(0,0,0,.15);
  flex-shrink: 0;
}

.palette-hex {
  font-size: 10px;
  color: var(--muted);
  margin-top: 6px;
  font-family: monospace;
  letter-spacing: .02em;
  opacity: .8;
}

@media print {
  body {
    background: white;
  }

  aside, .actions, .footer-actions, .notice, .btn, button {
    display: none !important;
  }

  section.card {
    box-shadow: none;
    break-inside: avoid;
  }
}
