* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 20px;
  font-family: Arial, sans-serif;
  background: #07120d;
  color: #f7efd9;
}

header {
  background: #0d1e17;
  padding: 20px;
  border-radius: 18px;
  margin-bottom: 25px;
}

header h1 {
  margin: 0 0 15px 0;
  color: #f5c96a;
}

.menu-superior {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.menu-superior a {
  background: #f5c96a;
  color: #07120d;
  text-decoration: none;
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: bold;
  transition: 0.2s;
}

.menu-superior a:hover {
  background: #ffd977;
  transform: translateY(-2px);
}

section {
  background: #10251c;
  padding: 22px;
  border-radius: 18px;
  margin-bottom: 25px;
}

section h2 {
  color: #f5c96a;
  margin-top: 0;
  margin-bottom: 20px;
}

/* GRID GENERAL */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

/* TARJETAS */
.card {
  background: linear-gradient(135deg, #123824, #0d2b1b);
  border-radius: 18px;
  padding: 16px;
  min-height: 170px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: 0.2s;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 18px rgba(245, 201, 106, 0.18);
}

.card h3 {
  color: #f5c96a;
  margin-top: 0;
  margin-bottom: 18px;
  min-height: 60px;
  font-size: 24px;
}

/* INPUTS */
.card input {
  width: 100%;
  margin-bottom: 10px;
  padding: 12px;
  border-radius: 10px;
  border: none;
  background: #f7f7f7;
  font-size: 16px;
}

.form {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.form input,
.form select,
.form button {
  padding: 12px;
  border-radius: 10px;
  border: none;
}

/* BOTONES */
button {
  background: #f5c96a;
  color: #07120d;
  font-weight: bold;
  cursor: pointer;
  border: none;
  padding: 12px;
  border-radius: 10px;
  transition: 0.2s;
}

button:hover {
  background: #ffd977;
  transform: scale(1.02);
}

/* TABLAS */
table {
  width: 100%;
  border-collapse: collapse;
  background: #0d1e17;
  border-radius: 12px;
  overflow: hidden;
}

th,
td {
  padding: 12px;
  border-bottom: 1px solid #244a36;
  text-align: left;
}

th {
  color: #f5c96a;
}

/* STOCK BAJO */
.bajo {
  background: #5a1d1d;
}

/* ALERTAS */
.alerta {
  background: #5a1d1d;
  padding: 12px;
  border-radius: 10px;
  margin-bottom: 10px;
}

.ok {
  background: #1f6b3a;
  padding: 12px;
  border-radius: 10px;
}

/* CATEGORÍAS DESPLEGABLES */
.categoria-ventas {
  background: #0d1e17;
  border-radius: 18px;
  padding: 18px;
  margin-bottom: 20px;
  border: 1px solid rgba(245, 201, 106, 0.08);
}

.categoria-ventas summary {
  cursor: pointer;
  list-style: none;
  font-size: 30px;
  font-weight: bold;
  color: #f5c96a;
  padding: 10px;
  user-select: none;
}

.categoria-ventas summary:hover {
  color: #ffd977;
}

.categoria-ventas summary::-webkit-details-marker {
  display: none;
}

.categoria-ventas[open] summary {
  margin-bottom: 20px;
}

.categoria-ventas .grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

/* RESPONSIVE */
@media (max-width: 1200px) {

  .grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .form {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 700px) {

  body {
    padding: 10px;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .form {
    grid-template-columns: 1fr;
  }

  .menu-superior {
    flex-direction: column;
  }

  .categoria-ventas summary {
    font-size: 24px;
  }

  .card h3 {
    font-size: 20px;
  }
}