
/* TOPBAR */
.topbar {
  height: 60px;
  /* background-color: #2f3640; */
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  flex-shrink: 0;
}

.topbar-logo {
  font-size: 1.3rem;
  font-weight: bold;
  color: #2f3640;
  margin-right: 20px;
  text-align: center;
}

.logoMy {
  color: #008d49;
  font-size: 0.9rem;
  font-family: 'Segoe UI', sans-serif;
  text-align: center;
  margin-bottom: 20px;
}

.logo-link {
  text-decoration: none;
  color: inherit;
}

.topbar #bemVindo {
  font-size: 0.85rem;
  color: #2f3640;
  font-style: italic;
}

/* TABELA */
table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
  }

/* === TABELA PADRÃO === */
/* .tabela-wrapper {
    width: 100%;
    min-height: 400px;
    overflow-y: auto;
    background-color: white;
    border-radius: 6px;
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.1);
    display: flex;
    overflow-x: auto !important;
    display: flex !important;
  } */

.tabela-wrapper {
  width: 100%;
  min-height: 400px;
  background-color: white;
  border-radius: 6px;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.1);
  overflow-x: auto;
  overflow-y: auto;
  display: block; /* flex não é necessário aqui */
}


/* MODAL */
#btnAbrirModal {
    background-color: #16a853b0; 
    border: none; 
    border-radius: 25%; 
    width: 30px; 
    height: 30px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    cursor: pointer; 
    box-shadow: 0 2px 6px rgba(0,0,0,0.15); 
    transition: background-color 0.3s, transform 0.2s;
}

#btnAbrirModal:hover {
  background-color: #27ae60;
  transform: scale(1.05);
}


/* Retirar incremento/decremento inputNumber - Mesmo sendo type="text", boa prática manter isso */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}


.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background-color: rgba(0,0,0,0.4);
  overflow-y: auto;
}

.modal-content {
  background-color: #fff;
  margin: 3% auto;  /* em vez de 10% */
  padding: 2rem;
  border-radius: 12px;
  width: 90%;
  max-width: 90vh; /* ocupa até 90% da altura da viewport */
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  position: relative;
  box-sizing: border-box;
  overflow: hidden; /* 💡 importante para respeitar o border-radius */
  overflow-y: auto;     /* adiciona scroll se necessário */
}

.modal-content h3 {
  margin-top: 0;
  font-size: 1.5rem;
  color: #333;
}

.close {
  position: absolute;
  right: 1rem;
  top: 1rem;
  font-size: 1.5rem;
  color: #aaa;
  cursor: pointer;
  transition: color 0.2s ease-in-out;
}
.close:hover {
  color: #000;
}

.form-modal {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  padding: 0; 
  margin-top: 1rem;
}

.form-modal label {
  display: flex;
  flex-direction: column;
  font-weight: 500;
  color: #444;
}

.form-modal input,
.form-modal select,
.form-modal textarea {
  width: 100%;
  padding: 0.5rem;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 5px;
  box-sizing: border-box;
  background-color: #f9f9f9;
}

.form-modal textarea {
  resize: vertical;
}

.btn-salvar {
  grid-column: span 2;
  width: 100%;
  padding: 12px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  transition: background-color 0.3s;
  box-sizing: border-box;
  margin-top: 1rem; /* 💡 empurra o botão pra cima, longe da borda */
}

.btn-salvar:hover {
  background-color: #0056b3;
}

.btn-salvar:active {
  background-color: #1e40af; /* Azul ainda mais escuro no clique */
}

.btn-salvar:disabled {
  background-color: #e5e7eb; /* Cinza claro */
  color: #6b7280; /* Cinza escuro */
  cursor: not-allowed; /* Mostra que está desabilitado */
  border-color: #d1d5db; /* Cor da borda */
}

.btn-excluir {
  grid-column: span 2;
  width: 100%;
  padding: 12px;
  background-color: #cf423f;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  transition: background-color 0.3s;
  box-sizing: border-box;
  margin-top: 1rem; /* 💡 empurra o botão pra cima, longe da borda */
}

.btn-excluir:hover {
  background-color: #d62926;
}

.btn-excluir:active {
  background-color: #bd1412; /* Azul ainda mais escuro no clique */
}

.btn-excluir:disabled {
  background-color: #e5e7eb; /* Cinza claro */
  color: #6b7280; /* Cinza escuro */
  cursor: not-allowed; /* Mostra que está desabilitado */
  border-color: #d1d5db; /* Cor da borda */
}

@media (max-width: 600px) {
  .form-modal {
    grid-template-columns: 1fr;
  }

  .btn-salvar {
    grid-column: span 1;
  }
}

/*ICONE PERFIL*/

.perfil-icone {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #007bff;
  color: white;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  text-decoration: none;
  font-size: 12px;
  transition: background-color 0.2s ease;
  border: none;
  cursor: pointer;
}

.perfil-icone:hover {
  background-color: #0056b3;
}

/*BOTÃO SAIR*/

.logout-icon {
  background-color: #dc3545;
  color: white;
  border: none;
  border-radius: 50%;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 12px;
  transition: background-color 0.2s ease;
}

.logout-icon:hover {
  background-color: #c82333;
}


/*MENSAGENS*/
.mensagem-sistema {
  padding: 12px 16px;
  border: 2px solid;
  border-radius: 6px;
  font-weight: bold;
  font-size: 14px;
  display: none;
  transition: opacity 0.3s ease-in-out;
}

.mensagem-sucesso {
  background-color: #e6f9ec;
  border-color: #1e7e34;
  color: #1e7e34;
}

.mensagem-erro {
  background-color: #fdecea;
  border-color: #c82333;
  color: #c82333;
}

.mensagem-notificacao {
  background-color: #eaeef1;
  border-color: #2c67a5;
  color: #0056b3;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.mensagem-notificacao button {
  background-color: #0056b3;
  color: white;
  border: none;
  padding: 6px 12px;
  font-weight: bold;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.mensagem-notificacao button:hover {
  background-color: #08407c;
}

.mensagem-alerta {
  background-color: #fff8e1;
  border-color: #856404;
  color: #856404;
}

.mensagem-upgrade {
  background-color: #fff4e5;
  border-color: #e67e22;
  color: #a04800;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.mensagem-upgrade button {
  background-color: #e67e22;
  color: white;
  border: none;
  padding: 6px 12px;
  font-weight: bold;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.mensagem-upgrade button:hover {
  background-color: #cf711c;
}


/*CAMPO OCUPANDO TODAS AS COLUNAS DO GRID DO FORMULÁRIO*/
.grid-twocol {
  grid-column: 1 / -1;
}

/*INPUT DE COR*/
.input-cor {
  border: 2px solid #ccc;
  border-radius: 6px;
  width: 100%;
  height: 40px;
  padding: 4px;
  cursor: pointer;
  background: none;
}

.portfoliorobo-color-circle {
  display: inline-block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid #999;
}

/*BADGES*/
.robo-badge-table {
  min-width: 60px;
  max-width: 90px;
  padding: 4px 8px;
  border-radius: 20px;
  color: white;
  font-size: 0.80rem;
  font-weight: bold;
  text-align: center;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

td .robo-badge-table {
  margin: 2px;
}

/* CHECKBOXES */

/* Container de checkbox */
.checkbox-custom {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
  font-size: 14px;
  gap: 8px;
}

/* Estiliza o input tipo checkbox */
.checkbox-custom input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  background-color: #fff;
  margin: 0;
  font: inherit;
  color: #2563eb;
  width: 18px;
  height: 18px;
  border: 2px solid #ccc;
  border-radius: 4px;
  display: grid;
  place-content: center;
  cursor: pointer;
  transition: border 0.2s ease;
}

/* Check visível quando marcado */
.checkbox-custom input[type="checkbox"]::before {
  content: "✔";
  font-size: 12px;
  color: white;
  transform: scale(0);
  transition: transform 0.2s ease;
}

/* Quando marcado, muda cor de fundo e mostra o check */
.checkbox-custom input[type="checkbox"]:checked {
  background-color: #2563eb;
  border-color: #2563eb;
}

.checkbox-custom input[type="checkbox"]:checked::before {
  transform: scale(1);
}

/* TOAST */

.toast {
  position: fixed;
  top: 1rem;
  right: 1rem;
  background-color: #fff3cd;
  color: #856404;
  border: 1px solid #ffeeba;
  padding: 12px 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  min-width: 250px;
  max-width: 350px;
  font-size: 0.9rem;
  font-weight: 500;
  z-index: 9999;
  opacity: 0;
  transform: translateY(-20px);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}


#toast.sucesso {
  background-color: #d4edda; /* verde claro */
  color: #155724;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.toast-icon {
  font-size: 1.2rem;
}

.toast-confirmacao {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  background-color: #fff;
  color: #333;
  border: 1px solid #ddd;
  padding: 20px 24px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  min-width: 300px;
  max-width: 400px;
  font-size: 1rem;
  font-weight: 500;
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.toast-confirmacao.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  pointer-events: auto;
  text-align: center;
}

.toast-confirmacao .botoes {
  display: flex;
  gap: 12px;
}

.toast-confirmacao button {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
}

.toast-confirmacao .btn-sim {
  background-color: #ffffff;   /* branco */
  color: #000000;             /* texto preto */
  border: 1px solid #000000;  /* contorno preto */
}

.toast-confirmacao .btn-nao {
  background-color: #ff0000;  /* vermelho */
  color: #ffffff;             /* texto branco */
  border: none;               /* sem borda */
}

.toast-titulo {
  font-size: 1.2rem;
  font-weight: bold;
  color: #000000; 
  margin-bottom: 5px;
  text-align: center;
}


/* MENU PERFIL/CONFIG/UPGRADE */

.dropdown-content {
  position: absolute;
  right: 0;
  top: 110%;
  background-color: white;
  min-width: 160px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  border-radius: 6px;
  overflow: hidden;
  z-index: 100;
}

.dropdown-content a {
  color: black;
  padding: 10px 14px;
  text-decoration: none;
  display: block;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dropdown-content a:hover {
  background-color: #f0f0f0;
}


@media (max-width: 768px) {

  #bemVindo {
    display: none !important;
  }

  .topbar-direita {
    justify-content: flex-start;
    margin-right: 10px;
  }

  .topbar-esquerda {
    justify-content: flex-start;
    margin-right: 10px;
  }

  .topbar {
    height: 60px;
    align-items: center;
    padding: 0 0.5rem;
  }

  .topbar-logo {
    flex: 1;
    font-size: 0.70rem;
    font-weight: bold;
    padding: 5px;
    color: #2f3640;
    margin-right: 5px;
    text-align: center;
    width: 100px;
  }

  .topbar-logo i {
    display: none;
  }

  .topbar-logo .logoMy {
    color: #008d49;
    font-size: 0.6rem;
    font-family: 'Segoe UI', sans-serif;
    text-align: center;
  } 

  .topbar-logo .logoTradeControl {
    color: #000000;
    font-size: 1rem;
    font-family: 'Segoe UI', sans-serif;
    text-align: center;
  } 

  .topbar-logo i {
    display: none;  /* oculta o ícone no mobile (opcional) */
  }


  /* SIDEBAR */
  .sidebar {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100% !important;
    height: auto !important;
    flex-direction: row !important;
    border-right: none !important;
    border-bottom: 2px solid #444;
    z-index: 1000;
  }

  /* Corrige os itens do menu */
  .sidebar ul {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-around;
    align-items: center;
    width: 100%;
    margin: 0;
    padding: 8px 0;
  }

  .sidebar li {
    flex: 1;
    text-align: center;
    padding: 6px;
  }

  .sidebar a {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 12px;
  }

  .sidebar a i {
    font-size: 1.2rem;
    margin-bottom: 3px;
  }

  /* Empurra o conteúdo principal pra baixo da barra fixa */
  .main {
    margin-left: 0 !important;
    margin-top: 70px !important;
  }

  /* Oculta o botão sanduíche */
  .toggle-btn {
    display: none !important;
  }

  /* Deixa a tabela horizontal rolável */
  .tabela-wrapper {
    overflow-x: auto !important;
  }

  /* Permite rolagem horizontal */
  .tabela-wrapper::-webkit-scrollbar {
    height: 6px;
  }
  .tabela-wrapper::-webkit-scrollbar-thumb {
    background: #bbb;
    border-radius: 4px;
  }

}