
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Playfair+Display:wght@600;700&display=swap');

:root {
  --rosa: #c47f91;
  --rosa-claro: #f9edf0;
  --fondo: #f8f7f7;
  --blanco: #ffffff;
  --texto: #29252a;
  --gris: #817b80;
  --borde: #eee5e8;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'DM Sans', sans-serif;
  background: var(--fondo);
  color: var(--texto);
}

button {
  font: inherit;
  cursor: pointer;
}

.aplicacion {
  display: flex;
  min-height: 100vh;
}

/* MENÚ LATERAL */

.menu-lateral {
  width: 260px;
  flex-shrink: 0;
  background: var(--blanco);
  border-right: 1px solid var(--borde);
  padding: 30px 18px;
  display: flex;
  flex-direction: column;
}

.marca {
  text-align: center;
  margin-bottom: 38px;
}

.marca h1 {
  font-family: 'Playfair Display', serif;
  font-size: 23px;
  letter-spacing: 1px;
  margin: 0;
}

.marca p {
  color: var(--gris);
  font-size: 12px;
  margin-top: 8px;
}

.navegacion {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.navegacion button {
  border: none;
  background: transparent;
  color: #514a50;
  text-align: left;
  padding: 14px 16px;
  border-radius: 10px;
  transition: 0.2s;
}

.navegacion button:hover {
  background: var(--rosa-claro);
}

.navegacion button.activo {
  background: var(--rosa-claro);
  color: #a34e69;
  font-weight: 700;
}

.usuario {
  margin-top: auto;
  padding: 20px 10px 0;
  border-top: 1px solid var(--borde);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.usuario span {
  font-weight: 600;
  font-size: 14px;
}

#cerrar-sesion {
  background: transparent;
  border: 1px solid var(--borde);
  padding: 10px;
  border-radius: 8px;
}

/* CONTENIDO */

.contenido {
  flex: 1;
  min-width: 0;
  padding: 35px;
}

.cabecera {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 30px;
}

.cabecera h2 {
  font-size: 27px;
  margin: 0 0 8px;
}

.cabecera p {
  margin: 0;
  color: var(--gris);
  font-size: 14px;
}

.boton-principal {
  background: var(--texto);
  color: white;
  border: none;
  border-radius: 9px;
  padding: 13px 22px;
  font-weight: 600;
}

.boton-principal:hover {
  background: var(--rosa);
}

/* TARJETAS */

.tarjetas {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}

.tarjeta {
  background: var(--blanco);
  padding: 24px;
  border: 1px solid var(--borde);
  border-radius: 14px;
}

.tarjeta p {
  color: var(--gris);
  font-size: 13px;
  margin: 0 0 15px;
}

.tarjeta h3 {
  font-size: 32px;
  margin: 0;
}

.panel {
  background: var(--blanco);
  padding: 28px;
  border: 1px solid var(--borde);
  border-radius: 14px;
}

.panel h3 {
  margin-top: 0;
  font-size: 19px;
}

.panel p {
  color: var(--gris);
  line-height: 1.7;
}

/* SECCIONES */

.seccion {
  display: none;
}

.seccion.activa {
  display: block;
}

/* TABLETS */

@media (max-width: 1100px) {
  .tarjetas {
    grid-template-columns: repeat(2, 1fr);
  }

  .menu-lateral {
    width: 220px;
  }

  .contenido {
    padding: 25px;
  }
}

/* MÓVILES */

@media (max-width: 700px) {
  .aplicacion {
    flex-direction: column;
  }

  .menu-lateral {
    width: 100%;
    padding: 16px;
    border-right: none;
    border-bottom: 1px solid var(--borde);
  }

  .marca {
    margin-bottom: 18px;
  }

  .navegacion {
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 8px;
  }

  .navegacion button {
    white-space: nowrap;
    padding: 12px;
    flex-shrink: 0;
  }

  .usuario {
    margin-top: 10px;
    padding-top: 12px;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .contenido {
    padding: 18px;
  }

  .cabecera {
    flex-direction: column;
    align-items: stretch;
  }

  .cabecera h2 {
    font-size: 23px;
  }

  .boton-principal {
    width: 100%;
  }

  .tarjetas {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .tarjeta {
    padding: 17px;
  }

  .tarjeta h3 {
    font-size: 25px;
  }

  .panel {
    padding: 20px;
  }
}

@media (max-width: 360px) {
  .tarjetas {
    grid-template-columns: 1fr;
  }
}

/* FORMULARIO DE PRODUCTOS */

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin: 25px 0;
}

.campo {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.campo label {
  font-size: 13px;
  font-weight: 600;
  color: var(--texto);
}

.campo input,
.campo select,
.campo textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--borde);
  border-radius: 9px;
  background: #fff;
  color: var(--texto);
  font: inherit;
  font-size: 14px;
  outline: none;
}

.campo input:focus,
.campo select:focus,
.campo textarea:focus {
  border-color: var(--rosa);
  box-shadow: 0 0 0 3px var(--rosa-claro);
}

.campo textarea {
  resize: vertical;
}

.campo-completo {
  grid-column: 1 / -1;
}

.panel-listado {
  margin-top: 24px;
}

#mensaje-producto {
  margin-top: 15px;
  font-size: 14px;
}

/* FORMULARIO EN MÓVILES */

@media (max-width: 700px) {
  .form-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .campo-completo {
    grid-column: auto;
  }

  #formulario-producto .boton-principal {
    width: 100%;
  }
}

/* TALLAS, COLORES Y EXISTENCIAS */

.panel-variantes {
  margin: 28px 0;
  padding: 24px;
  background: #fcf8f9;
  border: 1px solid var(--borde);
  border-radius: 12px;
}

.panel-variantes h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.panel-variantes p {
  margin: 0 0 22px;
  color: var(--gris);
  font-size: 14px;
}

.fila-variante {
  display: grid;
  grid-template-columns: 1fr 1fr 120px;
  gap: 15px;
  align-items: end;
  margin-bottom: 16px;
}

.boton-secundario {
  padding: 12px 18px;
  background: white;
  color: var(--texto);
  border: 1px solid var(--rosa);
  border-radius: 9px;
  font-weight: 600;
  transition: 0.2s;
}

.boton-secundario:hover {
  background: var(--rosa-claro);
}

/* ADAPTACIÓN A MÓVILES */

@media (max-width: 700px) {
  .panel-variantes {
    padding: 16px;
  }

  .fila-variante {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .boton-secundario {
    width: 100%;
  }
}

/* BOTÓN ELIMINAR VARIANTE */

.boton-eliminar-variante {
  grid-column: 1 / -1;
  justify-self: end;
  padding: 8px 12px;
  background: transparent;
  color: #b34a5b;
  border: 1px solid #e8b7bf;
  border-radius: 8px;
  font-size: 13px;
}

.boton-eliminar-variante:hover {
  background: #fce8ec;
}

/* =====================================
   PANTALLA DE ACCESO - ELOÍSA NELEB
===================================== */

#pantalla-login {
  min-height: 100vh;
  padding: 30px 20px;
  background: linear-gradient(145deg, #f9edf0, #ffffff 65%, #f5e6eb);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

#pantalla-login h1 {
  font-family: 'Playfair Display', serif;
  font-size: 38px;
  letter-spacing: 3px;
  text-align: center;
  margin: 0 0 12px;
  color: #29252a;
}

#pantalla-login h2 {
  font-size: 15px;
  font-weight: 400;
  color: #817b80;
  text-align: center;
  margin: 0 0 35px;
}

#formulario-login {
  width: 100%;
  max-width: 420px;
  padding: 38px;
  background: #ffffff;
  border: 1px solid #eee5e8;
  border-radius: 18px;
  box-shadow: 0 18px 55px rgba(120, 65, 85, 0.09);
  display: flex;
  flex-direction: column;
  gap: 13px;
}

#formulario-login label {
  font-size: 13px;
  font-weight: 600;
  color: #29252a;
}

#formulario-login input {
  width: 100%;
  padding: 14px 15px;
  margin-bottom: 9px;
  border: 1px solid #eee5e8;
  border-radius: 9px;
  background: #ffffff;
  font: inherit;
  font-size: 14px;
  outline: none;
}

#formulario-login input:focus {
  border-color: #c47f91;
  box-shadow: 0 0 0 3px #f9edf0;
}

#formulario-login button {
  margin-top: 12px;
  padding: 15px;
  border: none;
  border-radius: 9px;
  background: #29252a;
  color: white;
  font-weight: 600;
  transition: background 0.2s;
}

#formulario-login button:hover {
  background: #c47f91;
}

#mensaje-login {
  margin: 0;
  font-size: 13px;
  text-align: center;
  color: #b34a5b;
}

#mensaje-login:empty {
  display: none;
}

@media (max-width: 480px) {
  #pantalla-login h1 {
    font-size: 29px;
  }

  #formulario-login {
    padding: 26px 22px;
  }
}
/* =====================================
   FORMULARIO DE VENTAS
===================================== */

.formulario-ventas {
  margin-top: 25px;
}

.campos-venta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-bottom: 28px;
}

.campo-venta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.campo-venta label {
  font-size: 14px;
  font-weight: 600;
  color: #333;
}

.campo-venta select,
.campo-venta input {
  width: 100%;
  min-width: 0;
  padding: 15px 16px;
  border: 1px solid #e5dfe3;
  border-radius: 10px;
  background: #fff;
  color: #333;
  font-size: 15px;
  box-sizing: border-box;
}

.campo-venta select:focus,
.campo-venta input:focus {
  outline: none;
  border-color: #b87b91;
}

.campo-venta select:disabled {
  background: #f7f5f6;
  color: #999;
}

.boton-registrar-venta {
  background: #28252c;
  color: white;
  border: none;
  border-radius: 10px;
  padding: 16px 30px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

.boton-registrar-venta:hover {
  background: #9e6179;
}

#mensaje-venta {
  margin-top: 20px;
  font-size: 14px;
}

/* Adaptación a móviles */
@media (max-width: 768px) {
  .campos-venta {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .boton-registrar-venta {
    width: 100%;
  }
}
/* TABLA DE INVENTARIOS FÍSICOS */

.tabla-inventario {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  font-size: 14px;
}

.tabla-inventario th,
.tabla-inventario td {
  padding: 14px 12px;
  text-align: left;
  border-bottom: 1px solid #e8e3e5;
}

.tabla-inventario th {
  background-color: #f7eef1;
  color: #333;
  font-weight: 600;
}

.tabla-inventario tbody tr:hover {
  background-color: #fcf7f9;
}

.tabla-inventario input {
  width: 95px;
  padding: 9px;
  border: 1px solid #d8cbd0;
  border-radius: 6px;
  font-size: 14px;
}
/* HISTORIAL DE MOVIMIENTOS */

#historial table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  font-size: 14px;
}

#historial th {
  padding: 14px 12px;
  text-align: left;
  background-color: #f8f5f6;
  border-bottom: 2px solid #e5dfe2;
  white-space: nowrap;
}

#historial td {
  padding: 13px 12px;
  border-bottom: 1px solid #eee8eb;
  vertical-align: middle;
}

#historial tbody tr:hover {
  background-color: #faf6f8;
}

#historial tbody tr:last-child td {
  border-bottom: none;
}

/* Permitir desplazamiento horizontal en pantallas pequeñas */
#historial .panel {
  overflow-x: auto;
}
/* TABLA DE PRODUCTOS RESPONSIVE */

#listado-productos {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
/* BOTÓN REGISTRAR ENTRADA */

.boton-registrar-entrada {
  display: block;
  width: 100%;
  padding: 16px 20px;
  background-color: #29262c;
  color: white;
  border: none;
  border-radius: 9px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 20px;
}

.boton-registrar-entrada:hover {
  background-color: #49434d;
}
/* FILTROS DEL HISTORIAL EN MÓVILES */

@media (max-width: 700px) {
  .filtros-historial {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .filtros-historial label {
    display: block;
    width: 100%;
  }

  .filtros-historial input,
  .filtros-historial select,
  .filtros-historial button {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 12px;
    font-size: 15px;
  }
}
/* TABLA DEL HISTORIAL EN MÓVILES */

@media (max-width: 700px) {
  #historial .panel {
    min-width: 0;
  }

  #historial table {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  #historial th,
  #historial td {
    white-space: nowrap;
  }
}
/* INVENTARIO FÍSICO RESPONSIVE */

@media (max-width: 700px) {
  .tabla-inventario {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .tabla-inventario th,
  .tabla-inventario td {
    white-space: nowrap;
  }
}
/* BOTÓN NUEVO INVENTARIO */

#iniciar-inventario {
  display: block;
  width: 100%;
  padding: 16px 20px;
  background-color: #29262c;
  color: white;
  border: none;
  border-radius: 9px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 20px;
}

#iniciar-inventario:hover {
  background-color: #49434d;
}
/* MENÚ DE NAVEGACIÓN RESPONSIVE */

@media (max-width: 700px) {
  .menu-lateral .navegacion {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
  }

  .menu-lateral .navegacion button {
    width: 100%;
    min-width: 0;
    padding: 12px 6px;
    font-size: 13px;
    text-align: center;
    white-space: normal;
  }
}
/* TABLA DE GESTIÓN DE USUARIOS */

#usuarios table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

#usuarios th,
#usuarios td {
  padding: 14px 12px;
  text-align: left;
  border-bottom: 1px solid #e8e3e5;
}

#usuarios th {
  font-weight: 600;
  background-color: #faf7f8;
}

#usuarios tbody tr:hover {
  background-color: #fcf9fa;
}

#usuarios .panel {
  overflow-x: auto;
}


