@import url("https://fonts.googleapis.com/css2?family=Satisfy&display=swap");
@import url("https://fonts.googleapis.com/css2?family=DynaPuff&display=swap");
:root {
  --color-fondo: #ffffff;
  --color-texto: #333333;
  --color-texto-claro: #666666;
  --color-boton: #0044aa;
  --color-boton-borde: #1c1f1c;
  --color-boton-hover: #003688;
  --color-texto-boton: #fff;
  --color-texto-formulario: #333333;
  --color-fondo-formulario: #f7f7f7;
  --color-texto-claro-formulario: #333333;
  --color-acento: #ffffff;
  --color-icono: #ffffff;
  --color-error: #e74c3c;
  --color-exito: #2ecc71;
  --color-texto-alerta: #ffffff;
  --color-popup-strong: #fff;
  --color-popup-texto: #ddd;
  --color-popup-fondo: #0044aa;
  --color-barra: #0044aa;
  --color-texto-barra: #ffffff;
  --color-tagline: #666666;
  --area-cobranzas: #ffc107;
  --area-ventas: #17a2b8;
  --area-finanzas: #6f42c1;
  --area-sistema: #343a40;
  --color-notificacion: red;
  --color-nombre-sitio: #1c1f1c;
  --color-fondo-card: #f7f7f7;
  --color-fondo-card-hover: #17a2b8;
  --color-fondo-paginacion: #f7f7f7;
  --color-fondo-pagina-activa: #0044aa;
  --color-borde-sticky: #0044aa;
  --shadow-dark: rgba(0, 0, 0, 0.3);
  --shadow-light: rgba(255, 255, 255, 0.2);
  --sombra-interna-icono: inset 4px 4px 8px rgba(0,0,0,0.2), inset -4px -4px 8px rgba(255,255,255,0.3);
  --sombra-neomorfico: 8px 8px 16px rgba(0, 0, 0, 0.3), -8px -8px 16px rgba(0, 0, 0, 0.3);
  --sombra-neomorfico-hover: 10px 10px 20px rgba(0, 0, 0, 0.4), -10px -10px 20px rgba(0, 0, 0, 0.4);
}

/** Media Queries **/
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 62.5%;
  box-sizing: border-box;
  scroll-snap-type: y mandatory;
  overflow-x: hidden;
}

body {
  overflow-x: hidden;
  font-family: "Open Sans", sans-serif;
  line-height: 1.6;
  background-color: var(--color-fondo);
  color: var(--color-texto-claro);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  margin: 0 auto;
}

a {
  text-decoration: none;
}

h1, h2, h3, h4 {
  padding-left: 1rem;
  color: var(--color-texto);
}

.error-grave {
  text-align: center;
  font-size: 1.4rem;
  margin-top: 2rem;
  font-weight: bold;
}

.oculto {
  display: none !important;
}

body.temaOscuro {
  --color-fondo: #333333;
  --color-texto: #f5e8c8;
  --color-texto-claro: #fff;
  --color-boton: #1c1f1c;
  --color-boton-borde: #0044aa;
  --color-boton-hover: #003688;
  --color-texto-boton: #fff;
  --color-texto-formulario: #f5e8c8;
  --color-texto-claro-formulario: #fff;
  --color-fondo-formulario: #1c1f1c;
  --color-acento: #d4af37;
  --color-icono: #292929;
  --color-error: #e74c3c;
  --color-exito: #2ecc71;
  --color-texto-alerta: #ffffff;
  --color-popup-strong: #ffd700;
  --color-popup-texto: #fff;
  --color-popup-fondo: #1c1f1c;
  --color-barra: #1c1f1c;
  --color-texto-barra: #ffffff;
  --color-tagline: #999999;
  --area-cobranzas: #ffc107;
  --area-ventas: #17a2b8;
  --area-finanzas: #6f42c1;
  --area-sistema: #343a40;
  --color-notificacion: red;
  --color-nombre-sitio: #f5e8c8;
  --color-fondo-card: #1c1f1c;
  --color-fondo-card-hover: #2e2e2e;
  --color-fondo-paginacion: #1c1f1c;
  --color-fondo-pagina-activa: #333333;
  --color-borde-sticky: rgba(255, 255, 255, 0.1);
  --shadow-dark: rgba(0, 0, 0, 0.6);
  --shadow-light: rgba(255, 255, 255, 0.05);
  --sombra-interna-icono: inset 4px 4px 8px rgba(0, 0, 0, 0.2), inset -4px -4px 8px rgba(255, 255, 255, 0.05);
  --sombra-neomorfico: 8px 8px 16px rgba(0, 0, 0, 0.3), -8px -8px 16px rgba(0, 0, 0, 0.3);
  --sombra-neomorfico-hover: 10px 10px 20px rgba(0, 0, 0, 0.4), -10px -10px 20px rgba(0, 0, 0, 0.4);
}

.resumen__acciones {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
}

.btn-listado,
.btn-tengo,
.btn-sumar,
.btn-restar {
  border: none;
  cursor: pointer;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, opacity 0.2s ease;
}
.btn-listado:hover,
.btn-tengo:hover,
.btn-sumar:hover,
.btn-restar:hover {
  transform: translateY(-2px);
}
.btn-listado:active,
.btn-tengo:active,
.btn-sumar:active,
.btn-restar:active {
  transform: translateY(0);
  opacity: 0.85;
}

.btn-listado {
  padding: 1rem 1.4rem;
  border-radius: 1.2rem;
  color: var(--color-texto, #111);
  background: var(--color-card, #fff);
  box-shadow: 6px 6px 12px rgba(0, 0, 0, 0.12), -6px -6px 12px rgba(255, 255, 255, 0.75);
}

.btn-tengo {
  padding: 0.8rem 1rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.9);
  color: var(--color-texto, #111);
}
.btn-tengo.activo {
  background: #16a34a;
  color: #fff;
}

.btn-sumar,
.btn-restar {
  width: 3.2rem;
  height: 3.2rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--color-card, #fff);
  color: var(--color-texto, #111);
  box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.12), -4px -4px 8px rgba(255, 255, 255, 0.7);
}

.btn-sumar {
  color: #16a34a;
}

.btn-restar {
  color: #dc2626;
}

.modal-listado {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.modal-listado.activo {
  display: flex;
}
.modal-listado__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
}
.modal-listado__contenido {
  position: relative;
  z-index: 1;
  width: min(100%, 60rem);
  max-height: 80vh;
  background: var(--color-card, #ffffff);
  color: var(--color-texto, #111111);
  border-radius: 1.6rem;
  padding: 2rem;
  overflow: hidden;
  box-shadow: 0 2rem 5rem rgba(0, 0, 0, 0.35);
}
.modal-listado__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 1.5rem;
}
.modal-listado__header h2 {
  margin: 0;
}
.modal-listado__cerrar {
  border: none;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-size: 2rem;
  line-height: 1;
}
.modal-listado__body {
  max-height: 60vh;
  overflow-y: auto;
  display: grid;
  gap: 1rem;
  padding-right: 0.5rem;
}

.item-listado {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.2rem;
  border-radius: 1rem;
  background: var(--color-fondo-secundario, #f3f4f6);
}
.item-listado strong {
  font-weight: 700;
}
.item-listado span {
  opacity: 0.8;
  text-align: right;
}

.item-listado-vacio {
  margin: 0;
  padding: 1.5rem;
  text-align: center;
  opacity: 0.8;
}

.modal-seccion-listado {
  display: grid;
  gap: 1rem;
}
.modal-seccion-listado:not(:last-child) {
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
.modal-seccion-listado__header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 0;
  background: var(--color-card, #ffffff);
}
.modal-seccion-listado__header h3 {
  margin: 0;
  font-size: 1.5rem;
}
.modal-seccion-listado__header span {
  font-size: 1.2rem;
  opacity: 0.7;
}
.modal-seccion-listado__items {
  display: grid;
  gap: 0.8rem;
}

.contenedor {
  width: min(98%, 140rem);
  margin: 0 auto;
}

.resumen {
  box-shadow: 8px 8px 16px var(--shadow-dark), -8px -8px 16px var(--shadow-light);
  background: var(--color-fondo);
  border-radius: 1.6rem;
  padding: 2rem;
  margin-bottom: 2rem;
}
.resumen h1 {
  text-align: center;
  font-weight: bolder;
}
.resumen p {
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
}

.contenedor-resumen {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  align-items: center;
}

.buscador {
  margin-bottom: 2rem;
}
.buscador input {
  width: 100%;
  padding: 1.2rem;
  border-radius: 1rem;
  border: 1px solid var(--color-borde-sticky);
  background-color: var(--color-fondo-formulario);
  color: var(--color-texto-formulario);
  font-size: 1.6rem;
}

.listado-figuritas {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
@media (min-width: 768px) {
  .listado-figuritas {
    grid-template-columns: repeat(4, 1fr);
  }
}
@media (min-width: 1024px) {
  .listado-figuritas {
    grid-template-columns: repeat(5, 1fr);
  }
}

.figurita {
  box-shadow: 8px 8px 16px var(--shadow-dark), -8px -8px 16px var(--shadow-light);
  background: var(--color-fondo);
  border-radius: 1.6rem;
  padding: 0.3rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background-color: var(--color-fondo-card);
  transition: 0.2s ease;
}
.figurita:hover {
  transform: translateY(-2px);
}

.figurita:not(.tengo) {
  opacity: 0.5;
}

.figurita.tengo {
  opacity: 1;
  border-bottom: 0.5rem solid var(--color-exito);
}

.codigo {
  font-size: 1.4rem;
  font-weight: bolder;
}

.nombre {
  min-height: 4rem;
  font-size: 1.2rem;
}

.btn-tengo {
  background-color: var(--color-acento);
  color: var(--color-texto-claro);
  text-decoration: none;
  text-transform: uppercase;
  font-size: 2rem;
  font-weight: 900;
  padding: 1rem 3rem;
  text-align: center;
  border-radius: 1rem;
  margin-top: 3rem;
  border: none;
  margin-top: 0;
  font-size: 1rem;
  padding: 0.8rem;
}
.btn-tengo:hover {
  background-color: var(--color-texto-claro);
  color: var(--color-acento);
  cursor: pointer;
}

.repetidas-control {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
}
.repetidas-control button {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: none;
  cursor: pointer;
}

.repetidas {
  font-size: 1.4rem;
  font-weight: bolder;
  min-width: 3rem;
  text-align: center;
}

.barra-progreso {
  width: 100%;
  height: 1.4rem;
  margin-top: 1.5rem;
  border-radius: 999px;
  overflow: hidden;
  background-color: var(--color-fondo-formulario);
  box-shadow: inset 3px 3px 6px var(--shadow-dark), inset -3px -3px 6px var(--shadow-light);
}
.barra-progreso__relleno {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background-color: var(--color-exito);
  transition: width 0.25s ease;
}

.barra-progreso__relleno {
  height: 100%;
  width: 0;
  border-radius: 999px;
  transition: width 0.25s ease, background-color 0.25s ease;
}
.barra-progreso__relleno.rojo {
  background-color: #e74c3c;
}
.barra-progreso__relleno.naranja {
  background-color: #e67e22;
}
.barra-progreso__relleno.amarillo {
  background-color: #f1c40f;
}
.barra-progreso__relleno.verde {
  background-color: #2ecc71;
}
.barra-progreso__relleno.completo {
  background-color: #0044aa;
}

.album-seccion {
  box-shadow: 8px 8px 16px var(--shadow-dark), -8px -8px 16px var(--shadow-light);
  background: var(--color-fondo);
  border-radius: 1.6rem;
  padding: 0.5rem 0.5rem 1.5rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
  background-color: var(--color-fondo-card);
}

.resumen__marca {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
}

.resumen__logo {
  width: min(100%, 32rem);
  height: auto;
  display: block;
}