/* Estilo geral */
body{
  background-color: #706c6c;
}

header {
  position: fixed;          /* Fixa no topo da tela */
  top: 0;                   /* Alinha ao topo */
  left: 0;
  width: 100%;              /* Ocupa toda a largura */
  background-color: #1e1e1e;
  padding: 20px;
  text-align: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  z-index: 1000;            /* Fica acima dos outros elementos */
}

header h1 {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  color: white;
  font-size: 38px;
  font-weight: bold;
  letter-spacing: 2px;
  padding: 5px 0;
}

header h3{
  font-size: 15px;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin-top: 1px;
  margin-bottom: 1px;
  color: bisque;
  padding: 5px 0;
}
/* Animação suave */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

nav a {
  color: white;
  text-decoration: none;
  margin-left: 20px;
  font-size: 18px;
}

.opcoes {
  background-color: #333;
  padding: 1em 0;
  margin-top: 120px;
  color: #bbb;
}

.opcoes ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.opcoes ul li {
  position: relative;
  display: inline-block;
  padding: 10px 15px;
  background: none;   /* Remove fundo */
  font-size: 20px;
}

.opcoes ul li:hover {
  background-color: #575151;
  
}

.opcoes ul li a,
.opcoes ul li span {
  color: rgb(231, 225, 225);
  text-decoration: none;
  font-weight: bold;
  display: block;
  padding: 10px 15px;
  background: none;
  border: none;
  outline: none;
}

/* Submenu oculto até o hover */
nav.opcoes .submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  padding: 0;
  list-style: none;
  /*background: transparent;*/
  background-color: #1e1e1e;
 }

/* Exibe o submenu ao passar o mouse */
nav.opcoes li:hover .submenu {
  display: block;
}

/* Garante que os itens do submenu fiquem empilhados verticalmente */
nav.opcoes .submenu li {
  display: block; /* força um abaixo do outro */
  margin: 0;
  padding: 0;
}

/* Links do submenu */
nav.opcoes .submenu a {
  display: block; /* força cada link a ocupar uma linha inteira */
  padding: 6px 12px;
  color: #f1eaea;
  text-decoration: none;
  background: transparent; /* sem fundo branco */
  white-space: nowrap; /* 👈 evita quebra de linha */
  transition: background 0.3s, color 0.3s;
}

/* Hover no link: só destaca o texto, não o bloco inteiro */
nav.opcoes .submenu a:hover {
  /*background-color: #ccc;*/
  /*color: rgb(241, 135, 6);*/
  color: #db9806;
  background-color: #333333;
}

/* Scrollbar personalizada */
.submenu::-webkit-scrollbar {
  width: 8px;
}

.submenu::-webkit-scrollbar-track {
  background: #2a2a2a;
}

.submenu::-webkit-scrollbar-thumb {
  background-color: #4FC3F7;
  border-radius: 10px;
  border: 2px solid #2a2a2a;
}


/* Container com sombra e cantos arredondados */

.container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 280px;
  border-top: 30px;
  padding-top: 30px;
  padding: 40px;
  animation: slideIn 0.5s ease-out;
  background-color: #1e1e1e;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  max-width: 400px;
}

.container-data {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 430px;
  border-top: 30px;
  padding-top: 30px;
  padding: 40px;
  background-color: #1e1e1e;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  max-width: 400px;
}

.container-data h3{
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  text-align: center;
  margin-bottom: 25px;
  color: #f3ecec;
  font-size: 35px;
}

.container h3 {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  text-align: center;
  margin-bottom: 28px;
  color: #f3ecec;
  font-size: 30px;
}

.titulo-data {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  text-align: center;
  margin-bottom: 10px;
  color: #f3ecec;
  font-size: 25px;
}

/* Grupo de input com ícone */
.input-group {
  display: flex;
  align-items: center;
  background-color: #2a2a2a;
  padding: 10px;
  margin-bottom: 20px;
  border-radius: 8px;
  transition: background-color 0.3s;
}

.input-group:hover {
  background-color: #333;
}

.input-group i {
  color: #bbb;
  margin-right: 10px;
}

.input-group input {
  background: none;
  border: none;
  outline: none;
  color: #fff;
  flex: 1;
  font-size: 16px;
}

/* Botão com animação */
button {
  background-color: #007bff;
  color: white;
  padding: 12px;
  border: none;
  border-radius: 8px;
  width: 100%;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
}

button:hover {
  background-color: #0056b3;
  transform: scale(1.02);
}

/* Formulãrios */
.container-form {
  background-color: rgb(110, 107, 102);
  color: bisque;
}

/* Dados da tabela */
.table-dados {
  border-collapse: collapse;
  width: 100%;
  background-color: rgb(110, 107, 102); /* Fundo da tabela */
  color: rgb(245, 231, 216); 
  text-align: center;
}

.table-dados th, .table-dados td {
  padding: 4px; /* espaço entre linhas*/
  border: 1px solid #444;
  font-weight: bold;
}

.table-dados thead {
  background-color: #2c2c2c;
}
/*
.table th {
  font-weight: bold;
}
*/

.form-caixa {
  background-color: #1e1e1e;
  padding: 20px;
  border-radius: 8px;
  width: 100%;
  max-width: 800px;
  margin: auto;
  box-sizing: border-box;
  margin-top: 20px;
}

.form-titulo {
  text-align: center;
  margin-bottom: 40px;
}

.form-grupo {
  margin-bottom: 15px;
}

.form-label {
  display: block;
  margin-bottom: 5px;
  font-size: 1rem;
}

.form-campo {
  width: 100%;
  padding: 10px;
  background-color: #2c2c2c;
  border: 1px solid #444;
  color: white;
  border-radius: 4px;
  font-size: 1rem;
  box-sizing: border-box;
}

.form-botao {
  width: 100%;
  padding: 12px;
  background-color: #007bff;
  border: none;
  color: white;
  font-size: 1rem;
  cursor: pointer;
  border-radius: 4px;
}

.form-botao:hover {
  background-color: #0056b3;
}

@media (max-width: 400px) {
  .form-label, .form-campo, .form-botao {
    font-size: 0.95rem;
  }

  .form-botao {
    padding: 10px;
  }
}


.mensagem-sucesso {
  background-color: #2d4f2d;
  color: #d4ffd4;
  border: 1px solid #4caf50;
  padding: 20px;
  margin: 40px auto;
  max-width: 500px;
  border-radius: 8px;
  font-family: Arial, sans-serif;
  text-align: center;
  box-shadow: 0 0 10px rgba(0, 255, 0, 0.2);
}

.btn-voltar {
  display: inline-block;
  margin-top: 10px;
  padding: 10px 15px;
  background-color: #007bff;
  color: white;
  text-decoration: none;
  border-radius: 5px;
}

.btn-voltar:hover {
  background-color: #0056b3;
}

/* Animação de entrada */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== DASHBOARD HERO ===== */

.dashboard {
  margin-top: 140px;
  padding: 24px;
}

/* GRID */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-bottom: 35px;
}

/* HERO CARD */
.hero-card {
  background: linear-gradient(145deg, #1b1b1b, #2a2a2a);
  border-radius: 18px;
  padding: 26px;
  box-shadow: 0 10px 30px rgba(0,0,0,.45);
  transition: transform .2s ease, box-shadow .2s ease;
  cursor: pointer;
}

.hero-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(0,0,0,.6);
}

.hero-icon {
  font-size: 34px;
  opacity: .9;
}

.hero-title {
  font-size: 14px;
  color: #cfcfcf;
  margin-top: 8px;
  letter-spacing: .4px;
}

.hero-value {
  font-size: 36px;
  font-weight: 800;
  margin: 8px 0;
}

.hero-sub {
  font-size: 13px;
  color: #9e9e9e;
}

/* CORES */
.hero-green .hero-value { color: #4CAF50; }
.hero-red   .hero-value { color: #FF5252; }
.hero-blue  .hero-value { color: #4FC3F7; }
.hero-gold  .hero-value { color: #FFD54F; }

/* =========================================================
   DASHBOARD – ESTILO SEM QUEBRAR O SISTEMA
   (usa SOMENTE classes que já existem no HTML)
   ========================================================= */

/* === KPI CARDS === */
.card-kpi {
  background: linear-gradient(145deg, #1e1e1e, #2b2b2b);
  border-radius: 14px;
  padding: 22px;
  box-shadow: 0 8px 22px rgba(0,0,0,0.45);
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease;
  height: 100%;
}

.card-kpi:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 34px rgba(0,0,0,0.6);
}

.kpi-title {
  font-size: 14px;
  color: #cfcfcf;
  letter-spacing: .4px;
  margin-bottom: 6px;
}

.kpi-value {
  font-size: 30px;
  font-weight: bold;
  color: #4FC3F7;
  margin-bottom: 4px;
}

.kpi-sub {
  font-size: 13px;
  color: #9e9e9e;
}

/* Resultado negativo em vermelho automaticamente */
.card-kpi .kpi-value:has(+ .kpi-sub:contains("Vendas")) {
  color: #FF5252;
}

/* === PAINÉIS TOP 5 === */
.panel {
  background: linear-gradient(145deg, #1e1e1e, #2a2a2a);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.45);
  height: 100%;
}

.panel h5 {
  color: #ffffff;
  font-size: 18px;
  margin-bottom: 14px;
  border-bottom: 1px solid #444;
  padding-bottom: 8px;
}

/* === LISTA TOP 5 === */
.list-mini {
  list-style: none;
  padding: 0;
  margin: 0;
}

.list-mini li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 6px;
  border-bottom: 1px dashed #444;
  font-size: 14px;
  color: #eaeaea;
}

.list-mini li:last-child {
  border-bottom: none;
}

.list-mini li b {
  color: #f1f1f1;
}

.list-mini li:hover {
  background-color: rgba(255,255,255,0.04);
  border-radius: 6px;
}

/* ===== RANKING EM BARRAS (TOP 5) ===== */

.bar-item {
  margin-bottom: 14px;
}

.bar-label {
  display: block;
  font-size: 14px;
  color: #f1f1f1;
  margin-bottom: 2px;
}

.bar-value {
  float: right;
  font-size: 13px;
  color: #4FC3F7;
}

.bar-bg {
  width: 100%;
  height: 8px;
  background: #2c2c2c;
  border-radius: 6px;
  overflow: hidden;
  margin-top: 4px;
}

.bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #4CAF50, #81C784);
  border-radius: 6px;
  transition: width .6s ease;
}

.bar-fill.blue {
  background: linear-gradient(90deg, #4FC3F7, #81D4FA);
}

/* =========================================================
   ATIVA MODO GRÁFICO – TOP 5 (SEM QUEBRAR LISTAS)
   ========================================================= */

/* remove bolinha só dentro do ranking */
.rank-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.rank-list li {
  position: relative;
  padding: 8px 0 14px 0;
  margin-bottom: 6px;
}

/* texto */
.rank-name {
  display: block;
  font-size: 14px;
  color: #f1f1f1;
  margin-bottom: 2px;
}

.rank-value {
  position: absolute;
  right: 0;
  top: 0;
  font-size: 13px;
  color: #4FC3F7;
  font-weight: bold;
}

/* FUNDO DA BARRA */
.bar-bg {
  display: block;
  width: 100%;
  height: 10px;
  background-color: #2c2c2c;
  border-radius: 6px;
  overflow: hidden;
  margin-top: 6px;
}

/* BARRA PREENCHIDA */
.bar-fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #4CAF50, #81C784);
  border-radius: 6px;
  min-width: 2px;
}

/* cor alternativa */
.bar-fill.blue {
  background: linear-gradient(90deg, #4FC3F7, #81D4FA);
}