
body {
  margin: 0;
  font-family: 'Segoe UI', sans-serif;
  background: #ffffff;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 10px 24px;
  background: #ffffff;
  border-bottom: 1px solid #dce7f1;
  box-shadow: 0 10px 28px rgba(15, 76, 129, 0.08);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.topbar-marca {
  color: #0f4c81;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.topbar-acoes {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* HEADER */
header {
  text-align: center;
  padding: 50px 20px 30px;
}

.logo {
  display: flex;
  justify-content: center;
  align-items: center;
}

.logo img {
  width: min(300px, 25vw);
  height: auto;
  display: block;
}

.subtitulo {
  color: #555;
  font-size: 18px;
  margin-top: 5px;
}

/* CONTAINER */
.container {
  max-width: 1100px;
  margin: auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 30px;
  padding: 20px;
}

/* CARD */
.card {
  background: white;
  border-radius: 20px;
  padding: 30px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
  position: relative;
  overflow: hidden;
}

.card::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 5px;
  bottom: 0;
  left: 0;
  background: linear-gradient(90deg, #2e7d32, #1976d2);
}

.card:hover {
  transform: translateY(-8px) scale(1.02);
}

/* Ícone */
.card-icon {
  font-size: 40px;
  margin-bottom: 10px;
}

.card-icon-image img {
  width: 120px;
  height: 120px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

/* Título */
.card h3 {
  margin: 10px 0 5px;
  font-size: 20px;
}

/* Sub */
.card span {
  color: #777;
  font-size: 14px;
}

/* ADMIN BUTTON */
.admin-btn {
  border: none;
  background: linear-gradient(135deg, #1565c0, #1e88e5);
  color: white;
  padding: 12px 20px;
  border-radius: 50px;
  cursor: pointer;
  font-weight: bold;
  box-shadow: 0 10px 24px rgba(21, 101, 192, 0.26);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.admin-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(21, 101, 192, 0.3);
}

#conteudo {
  max-width: 1200px;
  margin: 0 auto 40px;
  padding: 0 20px 30px;
}

.secao-listagem {
  background: rgba(255, 255, 255, 0.92);
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 18px 40px rgba(12, 53, 87, 0.12);
  backdrop-filter: blur(8px);
}

.listagem-topo {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 22px;
}

.listagem-topo h2 {
  margin: 0 0 6px;
  font-size: 1.7rem;
  color: #183b56;
}

.listagem-topo p {
  margin: 0;
  color: #5d7285;
}

.listagem-total {
  padding: 10px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, #2e7d32, #1976d2);
  color: white;
  font-weight: 700;
  box-shadow: 0 10px 22px rgba(25, 118, 210, 0.18);
}

.tabela-wrapper {
  overflow-x: auto;
  border-radius: 18px;
  border: 1px solid #d7e5f0;
}

.tabela-produtos {
  width: 100%;
  border-collapse: collapse;
  min-width: 1100px;
  background: white;
}

.tabela-produtos th {
  padding: 14px 16px;
  text-align: left;
  font-size: 0.88rem;
  background: #183b56;
  color: white;
  white-space: nowrap;
}

.tabela-produtos td {
  padding: 14px 16px;
  border-bottom: 1px solid #ecf1f5;
  color: #334e68;
  font-size: 0.94rem;
  white-space: nowrap;
}

.tabela-produtos tbody tr:nth-child(even) {
  background: #f8fbfd;
}

.tabela-produtos tbody tr:hover {
  background: #eef7ff;
}

.tabela-produtos tbody tr.linha-limite {
  box-shadow: inset 4px 0 0 #d96b63;
}

.tabela-produtos tbody tr.linha-limite td {
  background: #fdeaea !important;
}

.tabela-produtos tbody tr.linha-limite:hover td {
  background: #f9dddd !important;
}

.estoque-col {
  font-weight: 700;
  color: #0f4c81;
}

.linha-limite .estoque-col {
  color: #a23f3a;
}

.limite-regra-texto {
  display: block;
  margin-top: 4px;
  color: #a94a45;
  font-size: 0.76rem;
  font-weight: 700;
}

.coluna-acoes {
  min-width: 190px;
}

.saida-acoes {
  display: flex;
  gap: 8px;
  align-items: center;
}

.saida-input {
  width: 72px;
  padding: 10px 12px;
  border: 1px solid #ccd9e5;
  border-radius: 10px;
}

.btn-debitar {
  border: none;
  border-radius: 10px;
  padding: 10px 12px;
  background: linear-gradient(135deg, #2e7d32, #1b76c6);
  color: white;
  font-weight: 700;
  cursor: pointer;
}

.btn-debitar:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.aviso-permissao {
  color: #708090;
  font-size: 0.82rem;
  font-weight: 600;
}

.tag-alerta-produto {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  background: #fff4df;
  color: #a06a10;
  font-size: 0.8rem;
  font-weight: 700;
}

.baloes-informativos {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 1200;
  display: grid;
  gap: 12px;
  width: min(360px, calc(100vw - 24px));
}

.balao-informativo {
  position: relative;
  padding: 16px 18px 14px;
  border-radius: 18px;
  background: linear-gradient(180deg, #fffdf7 0%, #fff4d8 100%);
  border: 1px solid #f0d389;
  box-shadow: 0 18px 35px rgba(122, 94, 24, 0.18);
  color: #5c480f;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.balao-informativo.visivel {
  opacity: 1;
  transform: translateY(0);
}

.balao-informativo strong {
  display: block;
  margin-bottom: 6px;
  padding-right: 26px;
  font-size: 0.96rem;
}

.balao-informativo p {
  margin: 0;
  line-height: 1.5;
  font-size: 0.9rem;
}

.balao-fechar {
  position: absolute;
  top: 10px;
  right: 10px;
  border: none;
  background: transparent;
  color: #7a5f1a;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
}

/* RESPONSIVO */
@media (max-width: 600px) {
  .topbar {
    flex-direction: column;
    align-items: stretch;
    padding: 10px 16px;
  }

  .topbar-marca {
    text-align: center;
  }

  .topbar-acoes {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-btn {
    width: 100%;
  }

  .logo img {
    width: min(280px, 88vw);
  }

  #conteudo {
    padding: 0 14px 100px;
  }

  .secao-listagem {
    padding: 18px;
    border-radius: 18px;
  }

  .listagem-topo {
    flex-direction: column;
  }

  .baloes-informativos {
    top: 12px;
    right: 12px;
    left: 12px;
    width: auto;
  }
}
