:root {
  --bg: #f4f7fb;
  --surface: rgba(255, 255, 255, 0.84);
  --text: #13304b;
  --muted: #537089;
  --line: rgba(19, 48, 75, 0.12);
  --blue: #155eef;
  --blue-deep: #0b3aa0;
  --amber: #ffbe0b;
  --orange: #ff7a00;
  --green: #16a34a;
  --red: #dc2626;
  --shadow: 0 20px 60px rgba(21, 46, 82, 0.16);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 14px;
}

/* Aplicando box-sizing global com segurança */
* {
  box-sizing: border-box;
}

html { 
  scroll-behavior: smooth; 
}

body {
  margin: 0;
  font-family: "Lexend", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 190, 11, 0.35), transparent 28%),
    radial-gradient(circle at top right, rgba(21, 94, 239, 0.16), transparent 24%),
    linear-gradient(180deg, #eff5fb 0%, #eef6ff 35%, #fff7e8 100%);
  min-height: 100vh;
}

button, input { font: inherit; }
a { color: inherit; }

.site-shell {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding-bottom: 56px;
}


/* --- ESTILIZAÇÃO PREMIUM DO CERTIFICADO --- */

.certificate {
  position: relative;
  overflow: hidden;
  min-height: 100%;
  padding: 40px; /* Aumentado para dar mais respiro */
  background: 
    radial-gradient(circle at top right, rgba(255, 190, 11, 0.25), transparent 45%),
    radial-gradient(circle at bottom left, rgba(21, 94, 239, 0.08), transparent 40%),
    linear-gradient(135deg, #ffffff 0%, #fffbf2 100%);
  border: 2px solid #e2e8f0;
  box-shadow: 0 30px 70px rgba(19, 48, 75, 0.15);
}

/* Moldura interna clássica de documentos oficiais */
.certificate::after {
  content: "";
  position: absolute;
  inset: 16px;
  border-radius: calc(var(--radius-xl) - 12px);
  border: 1px solid rgba(21, 94, 239, 0.3);
  box-shadow: 0 0 0 4px rgba(255, 190, 11, 0.15);
  pointer-events: none;
}

.certificate h3 {
  font-family: "Sora", sans-serif;
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  background: linear-gradient(135deg, var(--text), var(--blue-deep));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-top: 10px;
  letter-spacing: -0.02em;
}

.certificate p {
  font-size: 1.05rem;
  line-height: 1.8;
  color: #3b5266;
  max-width: 52ch;
}

/* Selo de Autenticidade em Destaque (Estilo Moeda de Ouro) */
.certificate-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ffe066 0%, #f5b000 50%, #cc8e00 100%);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  box-shadow: 0 8px 20px rgba(245, 176, 0, 0.3), inset 0 2px 2px rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Painel de Metadados Organizado */
.certificate-meta {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px dashed rgba(19, 48, 75, 0.12);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.certificate-meta article {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.certificate-meta span {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.certificate-meta strong {
  font-size: 1.1rem;
  color: var(--text);
}

/* Bloco Simulador de Assinatura Digital/Física */
.certificate-signature {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.signature-line {
  width: 200px;
  height: 1px;
  background: #cbd5e1;
}

.certificate-signature small {
  color: var(--muted);
  font-size: 0.85rem;
}



/* --- CERTIFICADO PREMIUM PARA DOWNLOAD (PDF A4 PAISAGEM) --- */

.certificate {
  position: relative;
  overflow: hidden;
  width: 1123px;  /* Largura exata do papel A4 em pixels (Proporção perfeita para PDF) */
  height: 794px;  /* Altura exata do papel A4 em pixels */
  padding: 60px;
  margin: 0 auto;
  background: 
    radial-gradient(circle at top right, rgba(255, 190, 11, 0.15), transparent 45%),
    radial-gradient(circle at bottom left, rgba(21, 94, 239, 0.05), transparent 40%),
    linear-gradient(135deg, #ffffff 0%, #fffdf7 100%);
  border: 1px solid #cbd5e1;
  box-shadow: 0 20px 50px rgba(19, 48, 75, 0.08);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  box-sizing: border-box;
  page-break-inside: avoid; /* Evita que o gerador de PDF quebre o documento em 2 páginas */
}

/* Moldura dupla oficial interna */
.certificate::after {
  content: "";
  position: absolute;
  inset: 24px;
  border-radius: var(--radius-lg);
  border: 2px solid rgba(21, 94, 239, 0.25);
  box-shadow: 0 0 0 6px rgba(255, 190, 11, 0.12);
  pointer-events: none;
}

/* Detalhes decorativos nos 4 cantos para parecer diploma */
.certificate::before {
  content: "";
  position: absolute;
  inset: 34px;
  border: 1px solid rgba(19, 48, 75, 0.06);
  pointer-events: none;
}

/* Título Principal */
.certificate h3 {
  font-family: "Sora", sans-serif;
  font-size: 3.2rem;
  font-weight: 800;
  color: #0b3aa0; /* Seu --blue-deep fixo para não falhar na exportação */
  margin: 20px 0 10px;
  letter-spacing: 0.1em;
  text-align: center;
  text-transform: uppercase;
}

/* Nome do Colaborador em Destaque */
.certificate .collaborator-name {
  font-size: 2.5rem;
  font-weight: 700;
  color: #13304b; /* Seu --text */
  margin: 15px 0;
  border-bottom: 2px solid rgba(255, 190, 11, 0.4);
  padding-bottom: 10px;
  min-width: 60%;
  text-align: center;
}

/* Texto descritivo */
.certificate p {
  font-size: 1.25rem;
  line-height: 1.8;
  color: #537089; /* Seu --muted */
  max-width: 65ch;
  text-align: center;
  margin: 10px 0;
}

/* Destaque para o Curso */
.certificate p strong {
  color: #13304b;
  font-weight: 700;
}

/* Painel de Informações Inferiores */
.certificate-meta {
  width: 100%;
  display: flex !important; /* Força flex alignment no PDF */
  justify-content: space-between;
  align-items: flex-end;
  margin-top: auto;
  padding-top: 40px;
  border-top: 1px dashed rgba(19, 48, 75, 0.15);
}

.certificate-meta article {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}

.certificate-meta article:last-child {
  text-align: right;
  align-items: flex-end;
}

.certificate-meta span {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #537089;
}

.certificate-meta strong {
  font-size: 1.2rem;
  color: #13304b;
}

/* Selo Durafort Safety Lab */
.certificate-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffbe0b 0%, #ff7a00 100%);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: 0 10px 25px rgba(255, 122, 0, 0.25);
  border: 4px solid #fff;
  line-height: 1.2;
  padding: 10px;
}



.icone-epi {
  width: 70px;
  height: 70px;
  object-fit: contain;
}

.topbar {
  top: 14px;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-top: 18px;
  padding: 16px 20px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.brand-badge {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--orange), var(--amber));
  color: #08223c;
  font-family: "Sora", sans-serif;
  font-weight: 800;
}

.brand strong, .brand small { display: block; }
.brand small, .label, .hero-stats span, .employee-metrics span, .certificate-meta span { color: var(--muted); }

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.nav a {
  text-decoration: none;
  font-size: 0.95rem;
}

.section { padding: 72px 0 0; }

.hero {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  align-items: center;
  gap: 34px;
  padding-top: 48px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--orange);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.82rem;
  font-weight: 700;
}

.hero h1, .section-heading h2 {
  margin: 0;
  font-family: "Sora", sans-serif;
  line-height: 1.02;
}

.hero h1 {
  font-size: clamp(2.8rem, 6vw, 5.1rem);
  max-width: 11ch;
}

.hero-text, .section-heading p, .hero-panel p, .feature-card p, .sector-panel p, .quiz-feedback, .simulator-feedback, .chat-message p, .chat-header p, .chat-note, .certificate p {
  color: var(--muted);
  line-height: 1.7;
}

.hero-actions, .quiz-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.btn {
  border: 0;
  cursor: pointer;
  padding: 15px 22px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover { transform: translateY(-2px); }

.btn-primary {
  color: white;
  background: linear-gradient(135deg, var(--blue), var(--blue-deep));
  box-shadow: 0 18px 36px rgba(21, 94, 239, 0.22);
}

.btn-secondary {
  color: var(--text);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(19, 48, 75, 0.12);
}

.hero-stats, .feature-strip, .employee-metrics, .certificate-meta {
  display: grid;
  gap: 16px;
}

.hero-stats {
  margin-top: 26px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hero-stats article, .employee-metrics article {
  padding: 18px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: var(--radius-md);
}

.hero-stats strong, .employee-metrics strong {
  display: block;
  font-size: 1.4rem;
}

.card-glow, .feature-card, .epi-card, .sector-button, .quiz-card, .quiz-score, .simulator-panel, .employee-form, .certificate {
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.82);
  background: var(--surface);
  backdrop-filter: blur(20px);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  gap: 21px;
}

.hero-card { padding: 24px; }

.scene-badge, .quiz-tag, .status-pill, .certificate-badge {
  display: inline-flex;
  width: fit-content;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 190, 11, 0.18);
  color: #7a4d00;
  font-size: 0.86rem;
  font-weight: 700;
}

.factory-illustration {
  position: relative;
  min-height: 420px;
  margin: 18px 0;
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(142, 211, 255, 0.5), rgba(255, 255, 255, 0.9)),
    linear-gradient(180deg, #d9ecff 0%, #fff2d4 100%);
  overflow: hidden;
}

.factory-bar {
  position: absolute;
  inset: 26px 18px auto;
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blue), var(--orange));
  margin-top: 44px;
}

.boneco {
  display: flex;
  align-items: center;
}

.worker, .risk-worker {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.worker-main { left: 19%; bottom: 38px; }
.worker-support { right: 18%; bottom: 44px; opacity: 0.72; }
.helmet, .goggles, .mask, .body, .boots { display: block; }

.helmet {
  width: 86px;
  height: 34px;
  border-radius: 70px 70px 18px 18px;
  background: linear-gradient(180deg, #ffd75e, var(--amber));
}

.goggles {
  width: 68px;
  height: 18px;
  margin-top: 6px;
  border-radius: 999px;
  background: rgba(6, 41, 70, 0.85);
}

.mask {
  width: 52px;
  height: 20px;
  margin-top: 8px;
  border-radius: 999px;
  background: #e9eef4;
}

.body {
  width: 96px;
  height: 150px;
  margin-top: 10px;
  border-radius: 28px 28px 18px 18px;
  background: linear-gradient(180deg, #1f6fff, #0a3ca8);
}

.boots {
  width: 94px;
  height: 24px;
  margin-top: 8px;
  border-radius: 16px;
  background: #0f1720;
}

.worker-support .body, .risk-worker .body { background: linear-gradient(180deg, #ffa74b, #ff7a00); }

.safety-chip {
  position: absolute;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 12px 30px rgba(19, 48, 75, 0.1);
  font-size: 0.92rem;
  font-weight: 700;
}

.chip-1 { top: 92px; left: 36px; }
.chip-2 { right: 30px; bottom: 64px; }
.chip-3 { top: 160px; right: 40px; }

.hero-panel {
  padding: 18px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.86);
}

.feature-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.feature-card {
  padding: 24px;
  display: flex;
  gap: 18px;
}

.feature-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255, 190, 11, 0.95), rgba(255, 122, 0, 0.9));
  color: #08223c;
  font-family: "Sora", sans-serif;
  font-weight: 800;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 28px;
}

.section-heading h2 {
  font-size: clamp(2rem, 4vw, 3.4rem);
  margin-bottom: 12px;
}

.epi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.epi-card {
  position: relative;
  overflow: hidden;
  padding: 24px;
  min-height: 250px;
  transition: transform 0.25s ease;
}

.epi-card:hover, .sector-button:hover { transform: translateY(-4px); }

.epi-card::after {
  content: "";
  position: absolute;
  inset: auto -20px -28px auto;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 190, 11, 0.16), transparent 70%);
}

.epi-icon {
  width: 70px;
  height: 70px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(21, 94, 239, 0.15), rgba(255, 122, 0, 0.18));
  font-size: 2rem;
}

.epi-card h3, .sector-panel h3, .quiz-card h3, .simulator-panel h3, .employee-form label, .certificate h3 { margin: 18px 0 10px; }
.epi-card p { color: var(--muted); line-height: 1.65; }

.epi-tag {
  margin-top: 14px;
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(21, 94, 239, 0.1);
  color: var(--blue-deep);
  font-weight: 700;
  font-size: 0.86rem;
}

.sector-layout, .quiz-shell, .simulator-shell, .employee-shell {
  display: grid;
  gap: 22px;
}

.sector-layout { grid-template-columns: 360px minmax(0, 1fr); }
.sector-list { display: grid; gap: 14px; }

.sector-button {
  padding: 18px 20px;
  text-align: left;
  border: 0;
  cursor: pointer;
  border-radius: var(--radius-lg);
}

.sector-button.active {
  background: linear-gradient(135deg, #155eef, #0d47c5);
  color: white;
}

.sector-button.active span, .sector-button.active small { color: rgba(255, 255, 255, 0.82); }
.sector-button strong, .sector-button span, .sector-button small { display: block; }
.sector-button span, .sector-button small { color: var(--muted); }
.sector-panel { padding: 28px; }

.sector-epi-list, .simulator-list {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}

.sector-epi-list li, .simulator-list li {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: rgba(21, 94, 239, 0.06);
  border: 1px solid rgba(21, 94, 239, 0.08);
}

.quiz-shell {
  grid-template-columns: 280px minmax(0, 1fr);
  align-items: start;
}

.quiz-score, .quiz-card, .simulator-panel, .employee-form, .certificate { padding: 26px; }

.quiz-score strong {
  display: block;
  margin: 12px 0 6px;
  font-size: 3rem;
  color: var(--orange);
}

.progress-bar {
  width: 100%;
  height: 12px;
  margin-top: 18px;
  border-radius: 999px;
  background: rgba(19, 48, 75, 0.08);
  overflow: hidden;
}

.progress-bar span {
  display: block;
  height: 100%;
  width: 20%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--amber), var(--orange));
  transition: width 0.25s ease;
}

.quiz-options {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.option-btn {
  width: 100%;
  text-align: left;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.option-btn:hover {
  transform: translateX(4px);
  border-color: rgba(21, 94, 239, 0.42);
}

.option-btn.correct {
  border-color: rgba(22, 163, 74, 0.5);
  background: rgba(22, 163, 74, 0.12);
}

.option-btn.incorrect {
  border-color: rgba(220, 38, 38, 0.42);
  background: rgba(220, 38, 38, 0.1);
}

.quiz-feedback {
  min-height: 52px;
  margin-top: 18px;
  font-weight: 500;
}

.simulator-shell { grid-template-columns: minmax(0, 1fr) 360px; }
.simulator-scene { padding: 24px; }
.simulator-banner { margin-bottom: 18px; }

.risk-area {
  position: relative;
  min-height: 470px;
  border-radius: 28px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(142, 211, 255, 0.45), rgba(255, 255, 255, 0.88)),
    linear-gradient(180deg, #d7ebff 0%, #ffe8bc 100%);
}

.risk-background { position: absolute; inset: 0; }

.machine {
  position: absolute;
  right: 10%;
  top: 18%;
  width: 240px;
  height: 210px;
  border-radius: 30px;
  background: linear-gradient(180deg, #4c7db8, #244565);
  box-shadow: inset 0 -24px 0 rgba(255, 190, 11, 0.5);
}

.risk-worker { left: 18%; bottom: 42px; }
.risk-worker .helmet { width: 84px; }

.hotspot {
  position: absolute;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.hotspot span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 24px rgba(19, 48, 75, 0.12);
  font-weight: 700;
}

.hotspot span::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 8px rgba(220, 38, 38, 0.15);
}

.hotspot.decoy span::before {
  background: var(--green);
  box-shadow: 0 0 0 8px rgba(22, 163, 74, 0.15);
}

.hotspot.found span {
  background: rgba(22, 163, 74, 0.14);
  color: var(--green);
}

.simulator-list li.done {
  background: rgba(22, 163, 74, 0.12);
  border-color: rgba(22, 163, 74, 0.15);
  color: #0f6a32;
}

.chatbot-shell { padding: 24px; }

.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 18px;
}

.chat-window {
  display: grid;
  gap: 12px;
  margin: 20px 0 16px;
  padding: 18px;
  min-height: 340px;
  max-height: 420px;
  overflow-y: auto;
  border-radius: var(--radius-lg);
  background: rgba(244, 247, 251, 0.9);
  border: 1px solid rgba(19, 48, 75, 0.08);
}

.chat-message {
  max-width: min(88%, 700px);
  padding: 14px 16px;
  border-radius: 18px;
  line-height: 1.6;
}

.chat-message strong { display: block; margin-bottom: 6px; }
.chat-message.bot { background: white; }
.chat-message.user { margin-left: auto; background: linear-gradient(135deg, rgba(21, 94, 239, 0.14), rgba(255, 122, 0, 0.14)); }

.chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
}

.chat-form input, .employee-form input {
  width: 100%;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(19, 48, 75, 0.12);
  background: white;
  color: var(--text);
}

.employee-shell { grid-template-columns: minmax(0, 420px) minmax(0, 1fr); }

.certificate {
  position: relative;
  overflow: hidden;
  min-height: 100%;
  background:
    radial-gradient(circle at top right, rgba(255, 190, 11, 0.2), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 245, 221, 0.92));
}

.certificate::after {
  content: "";
  position: absolute;
  inset: 18px;
  border-radius: calc(var(--radius-xl) - 10px);
  border: 1px dashed rgba(21, 94, 239, 0.18);
  pointer-events: none;
}

.certificate h3 {
  font-family: "Sora", sans-serif;
  font-size: clamp(1.7rem, 3vw, 2.5rem);
}

.certificate-meta {
  margin-top: 22px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.chat-float-button {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 65px;
  height: 65px;
  border-radius: 50%;
  background: #2563eb;
  color: white;
  font-size: 28px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(37,99,235,0.4);
  z-index: 9999;
  transition: 0.3s;
}

.chat-float-button:hover {
  transform: scale(1.08);
}

.chat-popup {
  position: fixed;
  bottom: 100px;
  right: 25px;
  width: 380px;
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  overflow: hidden;
  display: none;
  z-index: 9999;
}

.chat-popup.active {
  display: block;
  animation: subir .3s ease;
}

.chat-header {
  background: #1e293b;
  color: white;
  padding: 16px;
  display: flex;
  justify-content: space-between;
  cursor: pointer;
}

.chat-messages {
  padding: 20px;
  max-height: 300px;
  overflow-y: auto;
}

.bot-message, .user-message {
  padding: 12px;
  border-radius: 14px;
  margin-bottom: 12px;
}

.bot-message {
  background: #f1f5f9;
}

.user-message {
  background: #2563eb;
  color: white;
  text-align: right;
}

.chat-options {
  padding: 15px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chat-options button {
  border: none;
  padding: 10px;
  border-radius: 10px;
  cursor: pointer;
  background: #e2e8f0;
  font-size: 13px;
}

/* --- REGRAS DE ANIMAÇÃO E RESPONSIVIDADE (Media Queries) --- */

@keyframes subir {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1100px) {
  .hero, .quiz-shell, .simulator-shell, .employee-shell, .sector-layout, .feature-strip, .epi-grid {
    grid-template-columns: 1fr 1fr;
  }

  .quiz-shell, .simulator-shell, .employee-shell, .sector-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .site-shell { width: min(100% - 18px, 1240px); }

  .topbar {
    position: static;
    border-radius: 30px;
    padding: 18px;
  }

  .nav { display: none; }
  .hero, .hero-stats, .feature-strip, .epi-grid, .certificate-meta { grid-template-columns: 1fr; }
  .hero h1 { max-width: none; }
  .factory-illustration { min-height: 350px; }
  .worker-main { left: 10%; }
  .worker-support { right: 8%; }
}

@media (max-width: 540px) {
  .section { padding-top: 56px; }
  .hero { padding-top: 30px; }
  .hero-card, .quiz-score, .quiz-card, .simulator-scene, .simulator-panel, .chatbot-shell, .employee-form, .certificate { padding: 20px; }
  .chat-form { grid-template-columns: 1fr; }
  .factory-illustration, .risk-area { min-height: 300px; }
  .hotspot span { font-size: 0.8rem; }
}