.mosaic-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  flex-wrap: wrap;
}

#uf-filter {
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #0d0f13;
  color: var(--text);
  font-size: 14px;
}

#name-filter {
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #0d0f13;
  color: var(--text);
  font-size: 14px;
  width: 220px;
}

#name-filter:focus,
#uf-filter:focus {
  outline: none;
  border-color: var(--accent);
}

.check-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}

.mosaic-count {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}

.mosaic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
  padding: 16px 20px 40px;
}

.mosaic-loading {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--muted);
  padding: 40px 0;
}

.tile {
  display: block;
  position: relative;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: #0d0f13;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s ease, transform 0.1s ease;
}

.tile:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.tile img {
  width: 100%;
  height: 130px;
  object-fit: cover;
  display: block;
  background: #14161c;
}

.tile.no-image .tile-placeholder {
  width: 100%;
  height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--partial);
  font-size: 12px;
  background: repeating-linear-gradient(
    45deg,
    #14161c,
    #14161c 8px,
    #191c24 8px,
    #191c24 16px
  );
}

.tile.img-error img {
  display: none;
}

.tile.img-error::before {
  content: "erro ao carregar";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #e05b5b;
  font-size: 12px;
  background: #1c1416;
}

.tile-caption {
  padding: 6px 8px;
  font-size: 12px;
  line-height: 1.3;
  display: flex;
  justify-content: space-between;
  gap: 6px;
  align-items: baseline;
}

.tile-caption .tile-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tile-caption .tile-uf {
  color: var(--muted);
  font-size: 11px;
  flex-shrink: 0;
}
