body {
  font-family: Arial, sans-serif;
  background: #f4f4f9;
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

header {
  background: #8cc63f;
  border-bottom: 4px solid #4a7023;
  padding: 24px 0 12px 0;
  text-align: center;
  box-shadow: 0 2px 8px #8cc63f44;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
}

.logo-psd {
  height: 60px;
}

h1 {
  color: #4a7023;
  margin: 0;
  font-size: 2.1em;
  letter-spacing: 1px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

#logoutButton {
  background-color: #d9534f;
  border-color: #d43f3a;
  visibility: hidden;
  /* Começa escondido */
}

#logoutButton:hover {
  background-color: #c9302c;
  border-color: #ac2925;
}

/* Estilos da área de Login */
#loginArea {
  max-width: 400px;
  margin: 40px auto;
  padding: 25px;
  background: #fff;
  border: 2px solid #8cc63f;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

#loginArea h2 {
  text-align: center;
  color: #4a7023;
  margin-top: 0;
}

.input-group {
  margin-bottom: 15px;
}

.input-group label {
  display: block;
  margin-bottom: 5px;
  color: #333;
}

.input-group input {
  width: 100%;
  padding: 10px;
  font-size: 16px;
  border-radius: 5px;
  border: 1px solid #ccc;
  box-sizing: border-box;
}

#loginButton {
  width: 100%;
  padding: 12px;
  font-size: 18px;
  border-radius: 5px;
  background-color: #4a7023;
  color: #fff;
  border: 2px solid #4a7023;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s;
}

#loginButton:hover {
  background: #8cc63f;
}

#loginError {
  color: #d93025;
  text-align: center;
  margin-top: 15px;
  font-weight: bold;
}

.btn-flutuante {
  /* PROPRIEDADE CHAVE: Faz o elemento flutuar */
  position: fixed;

  /* Posição: 30px do fundo e 30px da direita */
  bottom: 40%;
  right: 30px;

  /* Z-Index garante que ele fique acima de outros conteúdos */
  z-index: 1000000;

  /* Estilos Visuais */
  width: 50px;
  height: 50px;
  background-image: linear-gradient(135deg, #9dd149 0%, #5a8029 100%);
  /* Azul vibrante */
  color: white;
  border-radius: 50%;
  /* Torna o botão redondo */

  text-align: center;

  font-size: 24px;
  /*line-height: 10px; /* Centraliza o ícone verticalmente */

  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  border: none;
  transition: background-color 0.3s ease, transform 0.3s ease;
  display: flex;
  justify-content: center;
  /* Centraliza Horizontalmente */
  align-items: center
}



.btn-flutuante:active {
  outline: none;
}

/* Estilo do ícone */
#iconeSom {
  display: inline-block;
  /* Já deve estar lá */
}

.btn-flutuante {
    /* PROPRIEDADE CHAVE: Faz o elemento flutuar */
    position: fixed;
    
    /* Posição: 30px do fundo e 30px da direita */
    bottom:40%; 
    right: 30px; 
    
    /* Z-Index garante que ele fique acima de outros conteúdos */
    z-index: 1000000; 
    
    /* Estilos Visuais */
    width: 50px;
    height: 50px;
    background-image: linear-gradient(135deg, #9dd149 0%, #5a8029 100%); /* Azul vibrante */
    color: white;
    border-radius: 50%; /* Torna o botão redondo */
    
    text-align: center;

    font-size: 24px;
    /*line-height: 10px; /* Centraliza o ícone verticalmente */

    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    border: none;
    transition: background-color 0.3s ease, transform 0.3s ease;
     display: flex;
    justify-content: center; /* Centraliza Horizontalmente */
    align-items: center
   
}



.btn-flutuante:active {
    outline: none;
}

/* Estilo do ícone */
#iconeSom {
display:inline-block; /* Já deve estar lá */
}


.btn-flutuanteB {
    /* PROPRIEDADE CHAVE: Faz o elemento flutuar */
    position: fixed;
    
    /* Posição: 30px do fundo e 30px da direita */
    bottom:60%; 
    right: 30px; 
    
    /* Z-Index garante que ele fique acima de outros conteúdos */
    z-index: 1000000; 
    
    /* Estilos Visuais */
    width: 50px;
    height: 50px;
    background-image: linear-gradient(135deg, #9dd149 0%, #5a8029 100%); /* Azul vibrante */
    color: white;
    border-radius: 50%; /* Torna o botão redondo */
    
    text-align: center;

    font-size: 24px;
    /*line-height: 10px; /* Centraliza o ícone verticalmente */

    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    border: none;
    transition: background-color 0.3s ease, transform 0.3s ease;
    /*display: flex;*/
    justify-content: center; /* Centraliza Horizontalmente */
    align-items: center
   
}



.btn-flutuanteB:active {
    outline: none;
}

/* Estilo do ícone */
#iconeForms {
display:inline-block; /* Já deve estar lá */
}
/* Fim dos estilos de Login */

/* Estilos da Seleção de Simulador */
#simulatorSelectionArea {
  max-width: 600px;
  margin: 40px auto;
  padding: 25px;
  background: #fff;
  border: 2px solid #8cc63f;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  text-align: center;
}

#simulatorSelectionArea h3 {
  color: #4a7023;
  margin-top: 0;
  margin-bottom: 25px;
}

.simulator-options button {
  display: block;
  width: 100%;
  padding: 15px;
  font-size: 18px;
  margin-bottom: 15px;
  cursor: pointer;
  border-radius: 8px;
  border: 2px solid;
  font-weight: bold;
  transition: all 0.2s ease;
}

#vendasBtn {
  background-color: #4a7023;
  color: #fff;
  border-color: #4a7023;
}

#vendasBtn :hover {
  background-color: #8cc63f;
  border-color: #8cc63f;
}



.simulator-options button:disabled {
  background-color: #e9ecef;
  color: #adb5bd;
  border-color: #ced4da;
  cursor: not-allowed;
}

#controls {
  text-align: center;
  margin-bottom: 20px;
}

button {
  padding: 10px 20px;
  font-size: 16px;
  cursor: pointer;
  border: none;
  border-radius: 5px;
  color: #fff;
  font-weight: bold;
  background: #4a7023;
  border: 2px solid #4a7023;
  transition: background 0.2s, color 0.2s, border 0.2s;
}

button:disabled {
  background: #bbb;
  border-color: #bbb;
  color: #eee;
  cursor: not-allowed;
}

/* Botão de Reiniciar Caso */
.restart-case-button {
  background: #ff9800;
  border: 2px solid #ff9800;
  color: white;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: bold;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(255, 152, 0, 0.3);
}

.restart-case-button:hover {
  background: #f57c00;
  border-color: #f57c00;
  box-shadow: 0 4px 12px rgba(255, 152, 0, 0.5);
  transform: translateY(-2px);
}

.restart-case-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(255, 152, 0, 0.3);
}

#startButton {
  background-color: #4a7023;
  border: 2px solid #4a7023;
}

#startButton:hover {
  background-color: #8cc63f;
  color: #fff;
  border: 2px solid #8cc63f;
}

#status {
  text-align: center;
  margin-bottom: 20px;
  font-style: italic;
  color: #4a7023;
  font-size: 1.1em;
}

#transcript {
  border: 2px solid #8cc63f;
  padding: 15px;
  height: 400px;
  overflow-y: scroll;
  overflow-x: hidden;
  background-color: #fff;
  border-radius: 12px;
  margin-bottom: 10px;
}


.message {
  margin-bottom: 10px;
  max-width: 80%;
  padding: 10px 16px;
  border-radius: 18px;
  display: inline-block;
  clear: both;
  font-size: 1.08em;
  height: auto;
  word-break: break-word;
  white-space: pre-line;
  max-height: 300px;
  overflow-y: auto;
  overflow-x: hidden;
}

.user {
  background: #8cc63f;
  color: #fff;
  float: right;
  text-align: right;
 
  border: 2px solid #8cc63f;
}

.bot {
  background: #4a7023;
  color: #fff;
  float: left;
  text-align: left;
  border: 2px solid #4a7023;
}

#textInputArea {

  text-align: center;
  margin-top: 20px;
  display: grid;

  grid-template-rows: auto;
  /* flex-direction: row;
  align-items: center;
  justify-content: center;*/
  align-items: center;
  gap: 10px;
  grid-template-columns:  1fr 3fr 1fr 0.1fr ;
}
.Vreproduz{
  margin-right: 3.5vw;
  padding: 8px;
  
  background-color:#c7c3c3;
  border-radius: 100%;
  
}
.Vreproduz:hover{
  background-color:#8f8e8e;
  color: #fff;
  border:  solid #8f8e8e;
  cursor: pointer;
}
#textInput {

  /*  min-width:200px;*/
 height: 7.8vh;
  padding: 10px 10px;
  font-size: 16px;
  border-radius: 22px;
  border: 2px solid #8cc63f;
  resize:none ;
  overflow-y: hidden;
  overflow-x: hidden;
  box-sizing: border-box;

  background: #fff;
}


#sendButton {
  padding: 12px 20px;
  font-size: 16px;
  border-radius: 22px;
  grid-column: 3;
  background-color: #4a7023;
  color: #fff;
  border: 2px solid #4a7023;

  width: 50%;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border 0.2s;
}

#sendButton:hover {
  background: #8cc63f;
  color: #fff;
  border: 2px solid #8cc63f;
}

/* Botão de microfone estilo WhatsApp */
#btnAudio {
  justify-items: center;
  width: 50px;
  height: 50px;
  grid-column: 1;


  padding: 0px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #4a7023;
  border: 2px solid #4a7023;
  color: #fff;
  cursor: pointer;
  transition: transform 0.1s ease, background 0.2s ease, border 0.2s ease;
  /*  margin-left: 100px;*/
  margin-left: 75%;


}

#btnAudio:active {
  transform: scale(0.96);
}

#btnAudio:hover {
  background: #8cc63f;
  border-color: #8cc63f;
}

#btnAudio[data-state="true"] {
  background: #8cc63f;
  border-color: #8cc63f;
}

#btnAudio>svg {
  width: 28px;
  height: 28px;
  /*display: block;*/
  color: #fff;
}

#phaseButtons {
  display: none;
  text-align: center;
  margin: 15px 0;
  padding: 10px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 2px solid #8cc63f;
}

.phase-button {
  padding: 8px 16px;
  font-size: 14px;
  border-radius: 5px;
  background-color: #ff6b35;
  color: #fff;
  border: 2px solid #ff6b35;
  margin: 0 5px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border 0.2s;
}

.phase-button:hover {
  background: #e55a2b;
  color: #fff;
  border: 2px solid #e55a2b;
}

.phase-button:disabled {
  background: #bbb;
  color: #eee;
  border: 2px solid #bbb;
  cursor: not-allowed;
}

.phase-button.active {
  background-color: #8cc63f;
  border: 2px solid #8cc63f;
}

.phase-button.active:hover {
  background: #4a7023;
  border: 2px solid #4a7023;
}

@media (max-width: 700px) {
  h1 {
    font-size: 1.5em;
    position: static;
    transform: none;
  }

  header {
    flex-direction: column;
  }

  #transcript {
    height: 220px;
  }

  .phase-button {
    margin: 2px;
    padding: 6px 12px;
    font-size: 12px;
  }
}

::-webkit-scrollbar {
  width: 8px;
  background: #8cc63f33;
}

::-webkit-scrollbar-thumb {
  background: #8cc63f99;
  border-radius: 8px;
}

.image-flex {
  display: flex;
  flex-direction: row;
  gap: 16px;
  justify-content: flex-start;
  align-items: flex-end;
}

/* Contêiner dos modais de formulário */
#formsModals {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /*display: none;*/
  justify-content: center;
  align-items: center;
  background: rgba(0,0,0,0.6);
  z-index: 2000000;
}

/* Estilos dos modais de formulário (fichas) */
.form-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* display controlled by aria-hidden attribute */
  justify-content: center;
  align-items: center;
  background: rgba(0,0,0,0.6);
  z-index: 2000000;
}
.form-modal[aria-hidden="true"]{ display: none; }
.form-modal[aria-hidden="false"]{ display: flex; }
.form-grid { 
  display: grid; 
  grid-template-columns: repeat(2, 1fr); 
  gap: 8px; 
  align-items: start;
  padding: 0;
  margin: 0;
}

.form-row { 
  display: flex; 
  flex-direction: column; 
  gap: 4px; 
  margin-bottom: 10px;
}

.btn-flutuante-erro {
    position: fixed;
    left: 24px;
    bottom: 32px;
    z-index: 9999;
    background: #ff5252;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.18);
    font-size: 28px;
    padding: 0;
   
}
.btn-flutuante-erro span {
    margin: 0;
    padding: 0;
    display: inline-block;
    width: 100%;
    text-align: center;
}
.btn-flutuante-erro:disabled {
    background: #ccc;
    color: #888;
    cursor: not-allowed;
}
.btn-flutuante-erro:hover:not(:disabled) {
    background: #d32f2f;
    box-shadow: 0 6px 24px rgba(255,82,82,0.25);
}

@media (max-width: 900px){
  .form-grid{ grid-template-columns: 1fr; }
  .form-modal-content{ width: 94%; padding: 6px 0 }
  .form-modal-header h2{ font-size: 1.05em }
}

/* Estilo inspirado no PDF convertido: aparência de papel, tipografia serif */
.form-modal-content {
  background: #fbf9f4; /* off-white tipo papel */
  font-family: Georgia, 'Times New Roman', serif;
  color: #222;
  padding: 20px 24px;
  max-width: 820px;
  max-height: 85vh;
  overflow-y: auto;
  border-radius: 6px;
  border: 1px solid #d7d2c8; /* borda sutil */
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}

.form-modal-header {
  background: transparent;
  color: #1f3b16;
  padding: 0 0 12px 0;
  margin: 0 0 16px 0;
  border-bottom: 1px solid #e6e1d8;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.form-modal-header h2 { 
  font-family: Georgia, serif; 
  font-weight: 700; 
  letter-spacing: 0.3px; 
  font-size: 1.05em;
  margin: 0;
  padding: 0;
}

.modal-close { 
  color: #333; 
  background: transparent; 
  border: none; 
  font-size: 18px;
  cursor: pointer;
  padding: 0 8px;
}

.form-row label { 
  font-family: Georgia, serif; 
  font-size: 0.9em; 
  color: #222; 
  margin-bottom: 3px; 
  display: block;
  font-weight: 600;
}

.form-row input, 
.form-row textarea, 
.form-row select {
  background: transparent;
  border: none;
  border-bottom: 1px solid #cfc7bb;
  padding: 6px 4px;
  box-shadow: none;
  border-radius: 0;
  font-family: Georgia, serif;
  font-size: 0.9em;
  color: #222;
}

.form-row input:focus, 
.form-row textarea:focus, 
.form-row select:focus {
  outline: none; 
  border-bottom-color: #8cc63f; 
  background: rgba(255,255,255,0.0);
}

.form-row.full { 
  grid-column: 1 / -1;
}

.form-modal .ficha-form {
  padding: 0;
  margin: 0;
}

.form-actions { 
  border-top: 1px solid #e6e1d8; 
  padding-top: 14px; 
  margin-top: 16px;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.btn-primary { 
  background: #4A7023;
  color: white;
  border: none;
  padding: 8px 18px;
  border-radius: 4px;
  cursor: pointer;
  font-family: Georgia, serif;
  font-weight: 600;
  font-size: 0.95em;
}

.btn-primary:hover {
  background: #3d5a1a;
}

.btn-secondary { 
  background: transparent;
  color: #4a4a4a;
  border: 1px solid #cfc7bb;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-family: Georgia, serif;
  font-size: 0.95em;
}

.btn-secondary:hover {
  background: #f5f5f5;
  border-color: #999;
}

/* Ajustes para impressão (se a ficha for impressa) */
@media print {
  .form-modal { 
    position: static; 
    background: transparent; 
    box-shadow: none;
  }
  .form-modal-content { 
    border: none; 
    box-shadow: none; 
    max-width: 100%;
    padding: 0;
  }
}

/* Ajuste do botão flutuante para ficar acima do botão de som */
#btnFlutuAtendimento { bottom: 78%; right: 30px; }

.image-group {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px #8cc63f55;
  margin-bottom: 10px;
  padding: 12px 12px 8px 12px;
  border: 2px solid #8cc63f;
  display: block;
}

/* Estilos para seleção de times */
#teamSelectionArea {
  max-width: 600px;
  margin: 40px auto;
  padding: 30px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 20px #8cc63f33;
  text-align: center;
}

#teamSelectionArea h3 {
  color: #4a7023;
  margin-bottom: 30px;
  font-size: 1.8em;
}
#teamSelectionAreaAtendimento {
  max-width: 600px;
  margin: 40px auto;
  padding: 30px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 20px #8cc63f33;
  text-align: center;
}

#teamSelectionAreaAtendimento h3 {
  color: #4a7023;
  margin-bottom: 30px;
  font-size: 1.8em;
}

.team-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.team-button {
  background: linear-gradient(135deg, #8cc63f 0%, #4a7023 100%);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 20px;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(140, 198, 63, 0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-height: 100px;
  justify-content: center;
}

.team-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(140, 198, 63, 0.4);
  background: linear-gradient(135deg, #9dd149 0%, #5a8029 100%);
}

.team-button:active {
  transform: translateY(0);
}

.team-name {
  font-size: 1.2em;
  font-weight: bold;
  margin-bottom: 8px;
  display: block;
}

.team-description {
  font-size: 0.9em;
  opacity: 0.9;
  font-weight: normal;
  display: block;
}

.back-button {
  background: #6c757d;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 12px 20px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s ease;
}

.back-button:hover {
  background: #5a6268;
  transform: translateY(-1px);
}

/* Animações para o lightbox de imagens */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}